in reply to Unicode and locales
With 5.8 you will want to use Encode, which comes with the core. I think it has been back ported to 5.6 but I am not quite sure. In any case you can also use Text::Iconv if you have the iconv library (also available for windows, here).
I see that cp1257 and of course iso8859-13 are supported so you should be OK.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unicode and locales
by moxliukas (Curate) on Nov 12, 2002 at 09:35 UTC | |
Unfortunately Encode needs perl version 5.7.3 (at least that's what perl -MCPAN -e 'install Encode' told me) I will try Text::Iconv and see if that works. Oh, and I have found the module Unicode::Map8. After reading the docs I am still not sure if it can be relevant to what I am doing. Can anyone enlighten me? I guess I'll have to upgrade to 5.8 on FreeBSD machine. It is probably high time to do it anyway ;) | [reply] [d/l] |
by mirod (Canon) on Nov 12, 2002 at 11:13 UTC | |
Unicode::Map8 (you need Unicode::String too) also do conversions and they don't rely on iconv. This means that they are probably more portable, but likely slower than Text::Iconv. I usually use Text::Iconv. You might find converting character encodings useful, it shows you various methods to convert utf8 characters to latin1. Here is a version that does not use XML::Parser (adapting it to other encodings is left as a(n easy) exercice for the reader ;--):
| [reply] [d/l] |
by mirod (Canon) on Nov 12, 2002 at 11:51 UTC | |
I think it's time for a benchmark here: Using perl 5.8.0, on Linux (Mandrake 9.0) on a rather fast machine (Athlon dual-processor 1.8):
Results:
Note: I am not an expert in using Benchmark, so please let me know if my test is flawed. | [reply] [d/l] [select] |