Bug 177244 - "locale -a" gives misleading information
Summary: "locale -a" gives misleading information
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-08 05:53 UTC by JW
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-08 14:47:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2006-01-08 05:53:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
If you type "locale -a" it shows locales with charsets such as "utf8".
But there is no charset "utf8".  There is a "UTF-8" one though.


Version-Release number of selected component (if applicable):
glibc-2.3.5-10.3

How reproducible:
Always

Steps to Reproduce:
1.type "locale -a"
2.
3.
  

Actual Results:  C
POSIX
aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER.utf8
....



Expected Results:  C
POSIX
aa_DJ
aa_DJ.ISO-8859-1
aa_DJ.UTF-8
aa_ER
aa_ER.UTF-8
...


Additional info:

Just listing directories in /usr/lib/locale is not the right way to enumerate locales.  The directories are named with different shceme to actual character set and used in LC_* environment variables.

Comment 1 Jakub Jelinek 2006-01-08 06:02:00 UTC
That's not misleading info, charset names are canonicalized and e.g. .UTF-8
is equivalent to .utf8, to .UTF8, .utf-8, .UTF______________8 etc.


Comment 2 JW 2006-01-08 06:05:01 UTC
Where is that documented?
Wouldn't it be proper for the user to only deal with offical names (eg UTF-8)
and not various mangled/canocialized names?



Comment 3 Jakub Jelinek 2006-01-08 14:47:45 UTC
Why does it need to be documented?  The locale names are an implementation detail
according to POSIX, and no matter whether you use say en_US.utf8 or en_US.UTF-8
it will work the same.

Comment 4 JW 2006-01-08 22:35:13 UTC
If you do "locale -m" there is no "utf8".
Yet if you do "locale -a" you get a whole bunch of character sets that according
to to "locale -m" do not exist.
It would be nice if "locale -m" and "locale -a" were complete and consistent.


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