Bug 74157 - strftime gets encoding very wrong under ru_RU.UTF-8
Summary: strftime gets encoding very wrong under ru_RU.UTF-8
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Chip Turner
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-17 01:30 UTC by Aleksey Nogin
Modified: 2007-04-18 16:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-15 06:43:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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-17 01:31 UTC, Aleksey Nogin
no flags Details | Diff

Description Aleksey Nogin 2002-09-17 01:30:41 UTC
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-17 01:31:22 UTC
Created attachment 76324 [details]
Test perl script

Comment 2 Aleksey Nogin 2003-01-06 10:21:02 UTC
Still exists in Phoebe.

Comment 3 Aleksey Nogin 2003-05-15 06:43:45 UTC
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.