Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 74157 - strftime gets encoding very wrong under ru_RU.UTF-8
strftime gets encoding very wrong under ru_RU.UTF-8
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-09-16 21:30 EDT by Aleksey Nogin
Modified: 2007-04-18 12:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-15 02:43:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test perl script (139 bytes, patch)
2002-09-16 21:31 EDT, Aleksey Nogin
no flags Details | Diff

  None (edit)
Description Aleksey Nogin 2002-09-16 21:30:41 EDT
If I run

  use POSIX qw(locale_h strftime);
  setlocale(LC_ALL, "");
  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.
Comment 1 Aleksey Nogin 2002-09-16 21:31:22 EDT
Created attachment 76324 [details]
Test perl script
Comment 2 Aleksey Nogin 2003-01-06 05:21:02 EST
Still exists in Phoebe.
Comment 3 Aleksey Nogin 2003-05-15 02:43:45 EDT
Works correctly in Cambridge alpha1 (perl-5.8.1-0.pre19333.1)

Note You need to log in before you can comment on or make changes to this bug.