On Mon, 28 Aug 2006, Kawasaki Yusuke wrote:
Hello from Japan.
Hello from Taiwan (at least for the next few days).
I think the month_name() method returns a string encoded in UTF-8.
However, it seems to be encoded in Latin-1 when locale => "fr".
This is an expected behavior?
my $fr = DateTime->now(locale=>"fr")->month_name; # août (Latin-1)
This returns a French word "août" encoded in Latin-1.
Under Perl 5.8+, I'd expect all the locale bits to be utf8.
I wrote a little program to test this for the french month name:
my $m = DateTime->now(locale=>"fr")->month_name;
print join '-', map { ord } split //, $m;
print "\n";
print 'IS', ( Encode::is_utf8($m) ? '' : ' NOT' ), " UTF8\n";
It printed:
97-111-251-116
IS UTF8
Looking at the Unicode tables, 251 is the right character for u with that
accent.
Why do you think it's Latin-1?
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/