Bug 177244 - "locale -a" gives misleading information
"locale -a" gives misleading information
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-08 00:53 EST by JW
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-08 09:47:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description JW 2006-01-08 00:53:40 EST
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 01:02:00 EST
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 01:05:01 EST
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 09:47:45 EST
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 17:35:13 EST
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.