Bug #65958 en_ZA number format incorrect
Submitted: 20 Jul 2012 9:35 Modified: 23 Jul 2012 7:19
Reporter: charl retief Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.5.24 OS:Linux (Ubuntu Server 12.04)
Assigned to: CPU Architecture:Any

[20 Jul 2012 9:35] charl retief
Description:
The English South Africa localization 'en_ZA' for number formatting is incorrect, South Africa uses a spaces for the thousands separator not commas.
And has also adopted the comma as its decimal mark.

The date formatting in this localization is correct for South Africa.

Other sources citing the same number formatting for South Africa:

http://en.wikipedia.org/wiki/Decimal_mark
http://en.wikinews.org/wiki/Wikinews:Style_guide
http://www.esn.org.za/pipermail/comp-studies/2011q3/003422.html
http://www.microsoft.com/resources/msdn/goglobal/default.mspx?submitted=1C09&OS=Windows%20...

How to repeat:
SELECT FORMAT(123456789.1234, 2,'en_ZA');

# This produces: 123,456,789.12
# while it is expected to be: 123 456 789,12
[20 Jul 2012 10:40] MySQL Verification Team
I wonder where to get a look at the source...?

Measuring Units and National Measuring standards Act, 1973 (Act No. 76 of 1973), Government Gazette No. 4326, 5 July 1974
[20 Jul 2012 12:08] Peter Laursen
I checked Conntrol Panel .. Regional Settings in Windows.

It tells the format "123 456 789.00"/"-123 456 789.00" for default number formatting in South Africa (note "." and not "," as decimal sign).

But the selector for 'seprator for cipher groups" both has options for SPACE and ".".  Also the selector for decimal sign has both "," and "." options.

@Shane .. you must know!?
[20 Jul 2012 12:13] Peter Laursen
Grouping setting for numbers in Windows / SA locale

Attachment: selector1.jpg (image/jpeg, text), 149.89 KiB.

[20 Jul 2012 12:14] Peter Laursen
Decimal sign setting for numbers in Windows / SA locale

Attachment: selector2.jpg (image/jpeg, text), 153.71 KiB.

[20 Jul 2012 13:40] charl retief
@Peter Windows is not a great source on this one, they have changed their default 'en_ZA' number formatting between Vista and 7.
In the XP and Vista releases they used 123,456.78 and in 7 they changed to 123 456.78. So you could see this as they corrected their error!
[20 Jul 2012 13:41] charl retief
@Shane
There is an updated version of the document you are looking for: Measurement Units and Measurement Standards Act, [No. 18 of 2006] 
Download here: http://www.info.gov.za/view/DownloadFileAction?id=67844

Here is the only relevant extract from this publication: 

"2. The units in the Republic and the symbols of those units and the rules relating to the
use of units and their symbols must be—
(a) the units, the appropriate symbols and the rules of the SI"

The SI units and rules are published in ISO 31-1.
Here is the best online version of the SI rules I can find, look at paragraph 5-3-4.
http://www.bipm.org/en/si/si_brochure/chapter5/5-3-2.html#5-3-4

PS.: I live in South Africa and we definitely follow the SI standards on pretty much everything.
[20 Jul 2012 14:20] charl retief
The Unicode Common Locale Data Repository confirms my claims of using a space as a thousands separator with a comma for the decimal point:

http://unicode.org/cldr/trac/browser/tags/release-2-0-1/posix/en_ZA.UTF-8.src#L7159
[23 Jul 2012 7:19] Valeriy Kravchuk
Many sources (including IBM manuals etc) agree with your claims. Some of South Africa citizens and software manufacturers don't agree. 

I'd let MySQL developers to decide if we should change our implementation of en_ZA locale.