public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/11629] New: locale -a reports incorrect codeset name when using locale-archive
@ 2010-05-24 16:49 yann at droneaud dot fr
  2010-05-25 15:04 ` [Bug libc/11629] " yann at droneaud dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: yann at droneaud dot fr @ 2010-05-24 16:49 UTC (permalink / raw)
  To: glibc-bugs

Even if locale -a output format is not specified by Open Group Base
Specifications Issue 7 / IEEE Std 1003.1-2008, the way it's currently showing
codeset doesn't match IANA names[1][4].

For example, en_US.UTF-8 became en_US.utf8 , and 'utf8' is not the proper way to
name UTF-8[2]. Another example, fr_FR.ISO-8859-15 became fr_FR.iso885915.

glibc's locale -a output, when using locale-archive file, doesn't match locale
-a's output from various BSD system.

More: when using glibc system without locale-archive, codeset name are reported
differently, e.g. like on the BSD system.

This behavor difference hit me while fixing a test from git testsuite[3].

locale -a should use nl_langinfo(CODESET) instead of the hash key stored in
locale-archive, and still report the hash key for compatibility.

[1] http://www.iana.org/assignments/character-sets
[2] http://en.wikipedia.org/wiki/UTF-8#Official_name_and_incorrect_variants
[3] http://thread.gmane.org/gmane.comp.version-control.git/147283/focus=147285
[4] See the following comment in intl/l10nflist.c :
    /* Normalize codeset name.  There is no standard for the codeset
       names.  Normalization allows the user to use any of the common
       names.  The return value is dynamically allocated and has to be
       freed by the caller.  */
    const char *
    _nl_normalize_codeset (codeset, name_len)

-- 
           Summary: locale -a reports incorrect codeset name when using
                    locale-archive
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: localedata
        AssignedTo: libc-locales at sources dot redhat dot com
        ReportedBy: yann at droneaud dot fr
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11629

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-11629-131@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2014-06-30 18:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 16:49 [Bug localedata/11629] New: locale -a reports incorrect codeset name when using locale-archive yann at droneaud dot fr
2010-05-25 15:04 ` [Bug libc/11629] " yann at droneaud dot fr
2010-05-25 15:11 ` [Bug libc/11629] locale -a reports incorrect codeset name especialy " yann at droneaud dot fr
2010-05-25 15:12 ` drepper at redhat dot com
2010-05-25 15:15 ` yann at droneaud dot fr
2010-05-25 15:19 ` yann at droneaud dot fr
     [not found] <bug-11629-131@http.sourceware.org/bugzilla/>
2014-06-30 18:02 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).