This is the mail archive of the libc-locales@sourceware.org mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/11629] New: locale -a reports incorrect codeset name when using locale-archive


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 the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]