perl-unicode

Re: Interpretation of non-UTF8 strings

2004-08-16 07:30:09
W liście z pon, 16-08-2004, godz. 16:31 +0300, Jarkko Hietaniemi
napisał:

In summary, some parts of Perl treat non-UTF-8 scalars as ISO-8859-1,
while others treat is as whatever is expected by default in files and
filenames and commandline (the locale tells what it is). It should be
decided one way or the other, otherwise generic code doesn't know how to
interpret Perl scalars it encounters.

"generic code"?  If you mean Perl, you can use utf8::is_utf8().  If you
mean XS, you can use SvUTF8().

I mean XS. If SvUTF8 is false, I don't know whether to interpret the
contents as ISO-8859-1 or according to the locale.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak(_at_)knm(_dot_)org(_dot_)pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

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