[Bug localedata/13147] New: incorrect numeric settings for French, Spanish, and German locales

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/13147] New: incorrect numeric settings for French, Spanish, and German locales

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=13147

             Bug #: 13147
           Summary: incorrect numeric settings for French, Spanish, and
                    German locales
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]
    Classification: Unclassified


Created attachment 5916
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5916
patch to update LC_NUMERIC for de, es and fr

In French (Canadian), the thousands separator is a space; it's a period in
Spanish (Spain) and in German (Austrian).  For example, "1 024" or "1.024"
respectively.

The fr_CA, es_ES, and de_AT locales in glibc-2.14 have the thousands separator
incorrectly defined as a null.

I compared the fr_*, es_*, and de_* files in glibc against the latest
Unicode CLDR (Common Locale Data Repository), version 1.9, and patched the
LC_NUMERIC section where appropriate.  See the attached patch.

http://unicode.org/Public/cldr/1.9.0/posix.zip
http://unicode.org/cldr/trac/browser/tags/release-1-9/posix/

Please update the es_*, fr_*, and de_* locale definitions.


Version-Release number of selected component (if applicable):
glibc-2.14-5 (Fedora 15)

How reproducible:
Always

Steps to Reproduce:
env LC_ALL=fr_CA.UTF-8 /usr/bin/printf "%'d\n" 4294967296
env LC_ALL=es_ES.UTF-8 /usr/bin/printf "%'d\n" 4294967296
env LC_ALL=de_AT.UTF-8 /usr/bin/printf "%'d\n" 4294967296

Actual Results:
4294967296
4294967296
4294967296

Expected Results:
4 294 967 296
4.294.967.296
4.294.967.296

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/13147] incorrect numeric settings for French, Spanish, and German locales

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=13147

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |drepper.fsp at gmail dot
                   |                            |com
         Resolution|                            |FIXED

--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-11-11 16:29:11 UTC ---
I've added a patch.  Your changes are in most places not optimal and in some
places wrong.  If es_CR really has to be changed you have to provide evidence.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/13147] incorrect numeric settings for French, Spanish, and German locales

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=13147

--- Comment #2 from Jeffrey Bastian <jbastian at redhat dot com> 2011-11-11 17:15:41 UTC ---
The links to the POSIX do not count as evidence?

From version 1.9 posix/es_CR.UTF-8.src:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*************
LC_NUMERIC
*************

decimal_point     "<COMMA>"
thousands_sep     "<FULL_STOP>"
grouping          3

END LC_NUMERIC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And from posix/UTF-8.cm:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<FULL_STOP>                                                                    
      \x2E
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hence the es_CR changes in my patch:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-thousands_sep        "<U0020>"
+thousands_sep        "<U002E>"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Am I reading the POSIX source incorrectly?

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/13147] incorrect numeric settings for French, Spanish, and German locales

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=13147

--- Comment #3 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-11-11 17:45:26 UTC ---
(In reply to comment #2)
> The links to the POSIX do not count as evidence?
>
> From version 1.9 posix/es_CR.UTF-8.src:

That's no authoritative information.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/13147] incorrect numeric settings for French, Spanish, and German locales

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=13147

Chris Leonard <cjlhomeaddress at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cjlhomeaddress at gmail dot
                   |                            |com

--- Comment #4 from Chris Leonard <cjlhomeaddress at gmail dot com> 2011-11-12 03:26:43 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > The links to the POSIX do not count as evidence?
> >
> > From version 1.9 posix/es_CR.UTF-8.src:
>
> That's no authoritative information.

What is considered authoritative?

For instance this document from the Costa Rican government's own website (their
"Plan Maestro Gobierno Digital" uses a mix of commas and periods as thousands
separators.

http://www.gobiernofacil.go.cr/e-gob/gobiernodigital/informes/PlanMaestroGD.pdf

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.