Red Hat Bugzilla – Bug 74157
strftime gets encoding very wrong under ru_RU.UTF-8
Last modified: 2007-04-18 12:46:45 EDT
If I run
use POSIX qw(locale_h strftime);
print (strftime("%a, %d %b %Y %H:%M:%S %z", gmtime()), "\n");
under ru_RU.UTF-8, then the result is completely miscoded - the output is not in
any legal encoding.
The "encoding" of the output can be described as a result of applying a
iso-8859-1..utf-8 conversion to a legal UTF-8 encoding of a Cyrillic time
string. In other words, currently (perl-5.8.0-50, glibc-2.2.93-2)
env LC_ALL=ru_RU.UTF-8 /tmp/test.pl | recode utf-8..iso8859-1
produces a utf-8 encoding of a Cyrillic time string.
Created attachment 76324 [details]
Test perl script
Still exists in Phoebe.
Works correctly in Cambridge alpha1 (perl-5.8.1-0.pre19333.1)