The locale file for en_ZA appears to have an error

Bug #1090288 reported by antgweb on 2012-12-14
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
langpack-locales (Ubuntu)
Medium
Gunnar Hjalmarsson

Bug Description

I suspect there is a problem with the locale for South Africa. The locale file for en_ZA located in /usr/share/i18n/locales has the following settings:

LC_Monetary
.....

% "."
mon_decimal_point "<U002C>"

% ","
mon_thousands_sep "<U00A0>"
mon_grouping 3;3
positive_sign ""
....

LC_NUMERIC
% "."
decimal_point "<U002C>"

% ","
thousands_sep "<U00A0>"
grouping 3;3
END LC_NUMERIC

- Unicode character <U002C> is for a comma "," and not a full stop "." It should be <U002E>
- Unicode character <U00A0> is for a non-breaking space " " and not a comma "," . If it's meant to be a comma it should be <U002C>

South Africa is on the metric system and uses a "." for decimal places. The above issue results in the regional settings having a comma in the decimal place and causes a number of errors when trying to use other software packages.

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1090288/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → console-setup (Ubuntu)
Colin Watson (cjwatson) wrote :

Fabio: It would be nice if, when triaging bugs, you at least took the time to look up which package owns a given file! The bug report specifically refers to /usr/share/i18n/locales/en_ZA, which is owned by the locales binary package, built by langpack-locales.

affects: console-setup (Ubuntu) → langpack-locales (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in langpack-locales (Ubuntu):
status: New → Confirmed
Don Schoeman (don.sch) wrote :

First of all, the locale file in question confuses people because the comments are incorrect. I think it may have been updated at some point and the comments weren't updated.

That being said, officially, the decimal seperator for South Africa is actually a comma and not a full stop, for example the following amount is how currency should appear: R143 012,12

The problem is that few South African's actually use it this way as even our most popular accounting packages uses .'s, as does our calculators, as does invoice slips, etc. Although irritating at the least (and causing all kinds of software related headaches at the most) this then is actually not a bug. What would help clear up at least some confusion is if the comments could reflect the actual value, e.g.:

% "."
mon_decimal_point "<U002C>"

Should be:

% ","
mon_decimal_point "<U002C>"

Please see this very helpfull blog post on South Africa's official currency/number format:
http://www.sadev.co.za/content/how-correctly-format-currency-south-africa

Don Schoeman (don.sch) wrote :

I posted a bit too fast as there is more to this. Although the official format for currency specifies that a "," (comma) be used as decimal seperator the same rule does not apply to standard numbers. This means that the LC_NUMERIC section indeed have a bug as it stands.

LC_NUMERIC
% "."
decimal_point "<U002C>"

% ","
thousands_sep "<U00A0>"

should be:

LC_NUMERIC
% "."
decimal_point "<U002E>"

% " "
thousands_sep "<U00A0>"

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2014-07-23 14:11, Don Schoeman wrote:
> Although the official format for currency specifies that a ","
> (comma) be used as decimal seperator the same rule does not apply to
> standard numbers.

Is there an official source supporting your claim that a dot should be used as the decimal separator in non-currency numbers?

But please note that this is more complicated. The upstream en_ZA locale actually uses dot as the decimal separator for both currency and numbers. The Ubuntu version of the locale is affected of the attached patch, which was applied as a solution of bug #887395.

Don Schoeman (don.sch) wrote :

I don't think there is a source that will support my claim except that every South African uses the decimal point for currency and numeric values, even on legal documents. There is a government editorial style guide which the Ubuntu team apparently followed here (this document does not differentiate between currency and numeric values):
http://www.gcis.gov.za/sites/default/files/editorial_styleguide_2011.pdf

I am not an expert on this subject and can only find blog posts covering the format of monetary values specifically. However, I have a number of examples where the official government guides are not followed:

Microsoft Windows uses the comma separator for currency and the "." decimal point for numeric values for the South Africa English locale.

The glibc team also uses the "." decimal point for South Africa English locale according to this blog: http://adrianfrith.com/2014/07/20/getting-rid-of-the-decimal-comma-in-ubuntu

Google Docs use the decimal point for both currency and numeric numbers even when selecting Afrikaans (I can't select English South Africa specifically so the next best option is Afrikaans, which is South African).

LibreOffice also uses the "." decimal point for currency and numeric values when selecting English South Africa.

I know the issue is more complex than just me claiming these things but we have to get a discussion going regarding this.

Don Schoeman (don.sch) wrote :

Just to amend my previous post again, perhaps I shouldn't say that every South African uses the decimal point, but certainly the majority does, including the government themselves.

Don Schoeman (don.sch) wrote :

I am still trying to find a source on this but may have to actually get into contact with the NMISA (National Metrology Institute of South Africa) organization. Apparently they are preparing an update of the regulation to be gazetted in 2014 that will indicate that both the comma and decimal point may legally be used and since they also don't differentiate between currency and numeric values it should count for both.

Gunnar Hjalmarsson (gunnarhj) wrote :

While the blog post you linked to notes the Ubuntu specific patch, it's wrong about the main reason why it was applied. As is stated in bug #887395 it was for consistency reasons, considering that qt applications were claimed to use comma as the decimal separator in case of an en_ZA locale.

That, OTOH, makes me hesitate. From what I have observed, the behaviour of qt applications with respect to locale handling is anything but convincing. For instance it seems like qt apps let the LC_NUMERIC locale category determine the display language, which is plain wrong. An example:

http://askubuntu.com/questions/447454/how-to-change-the-ui-language-on-clementine/447468#447468

If they instead used LC_NUMERIC for its intended purpose, we wouldn't have this problem now...

@Martin: What's your view on this? Do we have strong enough reasons to keep that patch? It hasn't yet been applied upstream after more than 2.5 years.

Gunnar Hjalmarsson (gunnarhj) wrote :
Changed in langpack-locales (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: Confirmed → In Progress
tags: added: patch
Martin Pitt (pitti) wrote :

Thanks Gunnar! Uploaded.

Changed in langpack-locales (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package langpack-locales - 2.13+git20120306-16

---------------
langpack-locales (2.13+git20120306-16) utopic; urgency=low

  * debian/patches/ubuntu-en_ZA-decimal.patch:
    Dropped to make dot and not comma the decimal sep. (LP: #1090288).
 -- Gunnar Hjalmarsson <email address hidden> Wed, 17 Sep 2014 18:20:00 +0200

Changed in langpack-locales (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions