Re: utf8 bug ?

On Sun, Sep 05, 2004 at 00:39:25 +0200, Christian Borup wrote:
On Sat, 2004-09-04 at 23:48 +0200, Jan Hudec wrote:
This is really strange:

The code:

use utf8;
$s1 = 'string';
$s2 = 'Åtring';
print "\$s1 ($s1) is " . (utf8::is_utf8($s1) ? '' : 'NOT ') . "unicode\n";
print "\$s2 ($s2) is " . (utf8::is_utf8($s2) ? '' : 'NOT ') . "unicode\n";


$s1 (string) is NOT unicode
$s2 (Åtring) is unicode

This isn't strange - that is exactly what should happen...

It depends on what the semantics of the utf8-mark is supposed to be. If
it's off, I'd expect the string to be in locale encoding. This one is in
both locale encoding and utf8, but it's origin suggests utf8 and not
locale should be prefered.

                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]