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

* [Bug libc/11629] locale -a reports incorrect codeset name when using locale-archive
  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 ` 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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: yann at droneaud dot fr @ 2010-05-25 15:04 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|libc-locales at sources dot |drepper at redhat dot com
                   |redhat dot com              |
          Component|localedata                  |libc


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

* [Bug libc/11629] locale -a reports incorrect codeset name especialy when using locale-archive
  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 ` yann at droneaud dot fr
  2010-05-25 15:12 ` drepper at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: yann at droneaud dot fr @ 2010-05-25 15:11 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From yann at droneaud dot fr  2010-05-25 15:10 -------
"Incorrect" codeset names are also reported when locale definition were created
with "incorrect" name:

  localedef -f UTF-8 -i en_US /usr/lib/locale/en_US.utf8 

Instead of

  localedef -f UTF-8 -i en_US /usr/lib/locale/en_US.UTF-8

locale -a will use the directory name, not the CODESET included in the definition.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|locale -a reports incorrect |locale -a reports incorrect
                   |codeset name when using     |codeset name especialy when
                   |locale-archive              |using locale-archive


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

* [Bug libc/11629] locale -a reports incorrect codeset name especialy when using locale-archive
  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
  4 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2010-05-25 15:12 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-05-25 15:12 -------
The output is the normalized name and what glibc will accept.  The output is
correct.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

* [Bug libc/11629] locale -a reports incorrect codeset name especialy when using locale-archive
  2010-05-24 16:49 [Bug localedata/11629] New: locale -a reports incorrect codeset name when using locale-archive yann at droneaud dot fr
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 7+ messages in thread
From: yann at droneaud dot fr @ 2010-05-25 15:15 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From yann at droneaud dot fr  2010-05-25 15:14 -------
(In reply to comment #1)
>   localedef -f UTF-8 -i en_US /usr/lib/locale/en_US.utf8 
> 
> Instead of
> 
>   localedef -f UTF-8 -i en_US /usr/lib/locale/en_US.UTF-8
> 

Note that if en_US.utf8 directory exists then en_US.UTF-8 is also supported, but
if only en_US.UTF-8 exists, en_US.utf8 is no more recognized.



-- 


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

* [Bug libc/11629] locale -a reports incorrect codeset name especialy when using locale-archive
  2010-05-24 16:49 [Bug localedata/11629] New: locale -a reports incorrect codeset name when using locale-archive yann at droneaud dot fr
                   ` (3 preceding siblings ...)
  2010-05-25 15:15 ` yann at droneaud dot fr
@ 2010-05-25 15:19 ` yann at droneaud dot fr
  4 siblings, 0 replies; 7+ messages in thread
From: yann at droneaud dot fr @ 2010-05-25 15:19 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From yann at droneaud dot fr  2010-05-25 15:18 -------
(In reply to comment #2)
> The output is the normalized name and what glibc will accept.  The output is
> correct.

Yes, it is correct.

My main concern problem here, is the difference from others systems: all systems
I've checked were reporting UTF-8, not utf8. When normalized, it doesn't use
IANA codeset names.



-- 


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

* [Bug libc/11629] locale -a reports incorrect codeset name especialy when using locale-archive
       [not found] <bug-11629-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 18:02 ` fweimer at redhat dot com
  0 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 18:02 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

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).