Bug 22019

Summary: Wrong placement of monetary symbol in el_GR (negative amounts)
Product: glibc Reporter: Christos Georgiou <tzotzioy+bzl>
Component: localedataAssignee: Mike FABIAN <maiku.fabian>
Status: RESOLVED FIXED    
Severity: normal CC: libc-locales, maiku.fabian, tzotzioy+bzl
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: 2.27   
Host: Target:
Build: Last reconfirmed: 2017-08-29 00:00:00

Description Christos Georgiou 2017-08-28 09:40:10 UTC
In el_GR.UTF-8 the field n_cs_precedes is set to 1 while p_cs_precedes is set to 0; this leads to the following formatting of monetary amounts:

* 16,20€
* -€16,80

This goes against common public usage of monetary amounts, and n_cs_precedes should be set to 0 just like p_cs_precedes.

I understand that I should provide a link to a proper standard (assumably from http://www.elot.gr/default_en.aspx , the Greek Standards Organisation) but it's difficult to provide one (web searches did not produce results, so I have contacted them by email and am still in the wait-for-a-reply-by-someone-in-the-know phase). I will try to update the issue with any relevant information.

In the meantime, I will see the proper way to submit a patch as an attachment here.

(Unless I happen to locate some pointer to a standard in the glibc/localedata/locales/el_GR change log.)
Comment 1 Mike FABIAN 2017-10-16 10:44:16 UTC
(In reply to Christos Georgiou from comment #0)

> I understand that I should provide a link to a proper standard (assumably
> from http://www.elot.gr/default_en.aspx , the Greek Standards Organisation)
> but it's difficult to provide one (web searches did not produce results, so
> I have contacted them by email and am still in the
> wait-for-a-reply-by-someone-in-the-know phase). I will try to update the
> issue with any relevant information.

Could you find a reference to a standard?
Comment 2 Christos Georgiou 2017-10-17 08:40:09 UTC
Still waiting for an answer from http://www.elot.gr/default_en.aspx , sorry.

However, is there any documentation referencing any standard for the current choice of different Positive/Negative formats? If not, then we can consider the possibility that the original choice was a mistake.

NB: until a standard is located (and I am pessimistic about it) the €### and ###€ are equally common in official (i.e. state) documents, although the most common case is not using the euro sign at all, it being implied or contained in the title of a column. But I haven't found anywhere an inconsistent usage in regards to the euro sign being used as a prefix or a suffix to the amount depending on the amount sign.
Comment 3 Mike FABIAN 2017-10-17 12:43:42 UTC
(In reply to Christos Georgiou from comment #2)
> Still waiting for an answer from http://www.elot.gr/default_en.aspx , sorry.
> 
> However, is there any documentation referencing any standard for the current
> choice of different Positive/Negative formats? If not, then we can consider
> the possibility that the original choice was a mistake.

Yes, I agree.

CLDR has this:

http://unicode.org/cldr/trac/browser/trunk/common/main/el.xml#L5563

    <currencyFormats numberSystem="latn">
    	<currencyFormatLength>
    		<currencyFormat type="standard">
    			<pattern>#,##0.00 ¤</pattern>
    		</currencyFormat>
    		<currencyFormat type="accounting">
    			<pattern>#,##0.00 ¤</pattern>
    		</currencyFormat>
    	</currencyFormatLength>

I.e. the currency sign comea after the amount.

In some locales like it_CH.xml CLDR has
different patterns for positive and negative
amounts separated by a “;”:

    <pattern>¤ #,##0.00;¤-#,##0.00</pattern>

As the el.xml file does not have this, I think we can  assume that the
positive and  negative amounts use the same pattern.
Comment 4 cvs-commit@gcc.gnu.org 2017-10-17 13:44:49 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  56a752ab6aa89088a787d852358cdd8f0a0d57f1 (commit)
      from  c38a4bfd596db2be2b9c1f96715bdc833eab760a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=56a752ab6aa89088a787d852358cdd8f0a0d57f1

commit 56a752ab6aa89088a787d852358cdd8f0a0d57f1
Author: Mike FABIAN <mfabian@redhat.com>
Date:   Tue Oct 17 14:54:53 2017 +0200

    Place monetary symbol in el_GR and el_CY after the amount
    
    CLDR uses this pattern as well.
    
    	[BZ #22019]
    	* localedata/locales/el_GR: Set n_cs_precedes to 0.
    	* localedata/locales/el_CY: copy "el_GR" because it is identical.
    	* stdlib/tst-strfmon_l.c: adapt test case.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    7 +++++++
 localedata/locales/el_CY |   16 +---------------
 localedata/locales/el_GR |    2 +-
 stdlib/tst-strfmon_l.c   |    4 ++--
 4 files changed, 11 insertions(+), 18 deletions(-)
Comment 5 Mike FABIAN 2017-10-17 13:48:49 UTC
FIXED in glibc master.