en_ZA locale decimal point inconsistency

Bug #887395 reported by Jean-Baptiste Mardelle on 2011-11-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLibC
Incomplete
Medium
langpack-locales (Ubuntu)
Medium
Unassigned

Bug Description

In the locales package, the file en_ZA (for South Africa) gives a dot '.' as decimal point. However, the Qt library gives a comma ',' as decimal point. This creates problems when a Qt program is trying to communicate with a non Qt program since the decimal point is not the same, numbers are not correctly recognized.

After doing some searching, Qt (see http://developer.qt.nokia.com/wiki/QtLocales) takes its locale information from cldr.unicode.org:
http://unicode.org/cldr/trac/browser/tags/release-2-0-1/posix/en_ZA.UTF-8.src

This page gives a comma as decimal separator. So does Wikipedia (see http://en.wikipedia.org/wiki/Decimal_mark - note that a footnote seems to indicate that this may be a recent official decision).

Having 2 different definitions for the decimal point on the same system can only lead to problems.

Using locales 2.13+git20110622-2, and qt 4:4.7.4-0ubuntu8

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: locales 2.13+git20110622-2
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic i686
NonfreeKernelModules: nvidia blackmagic
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Tue Nov 8 02:43:03 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: langpack-locales
UpgradeStatus: Upgraded to oneiric on 2011-10-18 (20 days ago)

Forwarded from https://launchpad.net/bugs/887395:

In the locales package, the file en_ZA (for South Africa) gives a dot '.' as decimal point. However, the Qt library gives a comma ',' as decimal point. This creates problems when a Qt program is trying to communicate with a non Qt program since the decimal point is not the same, numbers are not correctly recognized.

After doing some searching, Qt (see http://developer.qt.nokia.com/wiki/QtLocales) takes its locale information from cldr.unicode.org:
http://unicode.org/cldr/trac/browser/tags/release-2-0-1/posix/en_ZA.UTF-8.src

This page gives a comma as decimal separator. So does Wikipedia (see http://en.wikipedia.org/wiki/Decimal_mark - note that a footnote seems to indicate that this may be a recent official decision).

Having 2 different definitions for the decimal point on the same system can only lead to problems.

-----

http://www.gcis.gov.za/resource_centre/guidelines/styleguide/editorial_styleguide_2011.pdf is an official document which says to use the comma.

Created attachment 6059
patch

Martin Pitt (pitti) wrote :

Forwarded upstream, and committed to Ubuntu package.

Changed in langpack-locales (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package langpack-locales - 2.13+git20111116-1

---------------
langpack-locales (2.13+git20111116-1) precise; urgency=low

  * Update to current upstream glibc git head localedata.
  * Unfuzz patches for the current upstream version.
  * Add ubuntu-brx_IN.patch. (LP: #874909)
  * Add ubuntu-nl_BE-monetary.patch: Use Dutch monetary format for nl_BE.
    (LP: #586742)
  * Add ubuntu-en_ZA-decimal.patch: South Africa uses comma as a decimal
    separator. (LP: #887395)
  * debian/control: Bump Standards-Version to 3.9.2. No changes necessary.
  * Switch to 3.0 (quilt) source format.
 -- Martin Pitt <email address hidden> Wed, 16 Nov 2011 12:02:43 +0100

Changed in langpack-locales (Ubuntu):
status: Fix Committed → Fix Released
Changed in glibc:
importance: Unknown → Medium
status: Unknown → Confirmed

You have to get the original contributor to agree.

Changed in glibc:
status: Confirmed → Incomplete
Martin Pitt (pitti) wrote :

j-b-m, can you please follow up to http://sourceware.org/bugzilla/show_bug.cgi?id=13414 so that this can get accepted upstream? Thanks!

Created attachment 6138
Patch with updated comments

The patch proposed by martin Pitt is is ok for, but I guess it's better to also fix the comments of the en_ZA file. I uploaded a patch that contains the fix proposed by Martin as well as comment fixes.

Claude, you submitted the files in bugreport 12681. Could you confirm the changes, please?

I submitted en_ZM, not en_ZA. But I pinged Dwayne as the en_ZA maintainer, and I'm sure he will soon comment.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.