perl-unicode

Re: help: utf8 to multiple encodings

2000-10-18 07:08:24
On Wed, 18 Oct 2000, Ilia Lobsanov wrote:

I just discovered Unicode::MapUTF8.

I tried it for:
    from_utf8({ -string => $str, -charset => 'koi8-r' });

It failed saying:
    character set 'koi8-r' is not supported

Yet, I do have the set at
/usr/lib/perl5/site_perl/5.005/i386-linux/Unicode/Map8/maps/koi8-r.bin

What is wrong?

My code. ;)

I released Unicode::MapUTF8 only a few days ago. I obtained my list of
supported mappings from the map/aliases file - which doesn't contain the
koi-8 mappings (presumably because they don't have any aliases). I will
update it to stea^H^H^H^H reuse the code from 'umap' to determine the list
of Map8 encodings dynamically at run time in the next release. In the
meanwhile, you can work around it by adding 'koi8-r' directly in
MapUTF8.pm in the hash of supported encodings with a line like this:

 'koi8-r'            => 'map8', 

-- 
Benjamin Franz

   Perl - A post-modern programming language or a 
   scripting tool gone horribly, horribly wrong? 
                              -- Rob Malda

<Prev in Thread] Current Thread [Next in Thread>