perl-unicode

Re: Interpretation of non-UTF8 strings

2004-08-16 08:30:06
Marcin 'Qrczak' Kowalczyk <qrczak(_at_)knm(_dot_)org(_dot_)pl> writes:
But there is a simple workaround for that, as perluniintro would tell
you: the encoding pragma.

The encoding pragma partially works. It doesn't influence assumed
encoding of files opened without specifying the encoding, nor handling
of filenames, and it needs to be told about the encoding literally.
How to say it should be taken from the locale?

Once we had 

use encoding qw(locale);

But it did not work well as not all locale implementations
give the API to return the encoding.  
(And even en_GB can be in ASCII, 8859-1, 8859-15 (with euro), UTF-8, ...)


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