in reply to POSIX::strftime encoding
That is actually correct. "fr_FR.utf8" means that, because of the utf8 string, utf8 is default. You don't need to call utf8 because perl will do it automatically; however, if you call utf8, the wrong move, then you get some weird stuff in return.
Try this with your locale fr_FR. Calling binmode should work for you:
#!/usr/bin/perl use strict; use warnings; use Time::Piece; open STDOUT, '>', 'time.log'; my $t = localtime; print $t->strftime("%c"), "\n"; my $mt = localtime; binmode STDOUT, ":utf8"; print $mt->strftime("%c"), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POSIX::strftime encoding
by squentin (Sexton) on Aug 25, 2010 at 12:43 UTC |