From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117360 invoked by alias); 26 Oct 2018 19:25:27 -0000 Mailing-List: contact libc-locales-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-locales-owner@sourceware.org Received: (qmail 116920 invoked by uid 48); 26 Oct 2018 19:25:21 -0000 From: "rbuj at fedoraproject dot org" To: libc-locales@sourceware.org Subject: [Bug localedata/23791] Wrong monetary format for ca_ES locale Date: Fri, 26 Oct 2018 19:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: localedata X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rbuj at fedoraproject dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q4/txt/msg00090.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23791 --- Comment #14 from Robert Buj --- =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Issue =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 The currency symbol succeeds the value in Catalan. [robert@localhost ~]$ uname -a Linux localhost.localdomain 4.18.16-200.fc28.x86_64 #1 SMP Sat Oct 20 23:53= :47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [robert@localhost ~]$ LANG=3DC dnf info glibc Name : glibc Version : 2.27 Release : 33.fc28 Arch : x86_64 Size : 13 M Source : glibc-2.27-33.fc28.src.rpm ... =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Test code =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 [robert@localhost ~]$ cat test.c=20 #include #include #include #include #include #include int main () { struct lconv * lc; char string[100]; double money =3D -1234.56; if (setlocale(LC_ALL, "ca_ES.UTF-8") =3D=3D NULL) { printf("Unable to setlocale().\n"); exit(1); } lc =3D localeconv(); printf("Currency symbol: [%s]\n",lc->currency_symbol); printf("International currency symbol: [%s]\n",lc->int_curr_symbol); printf("Currency decimal point: [%s]\n",lc->mon_decimal_point); printf("Currency thousands sep: [%s]\n",lc->mon_thousands_sep); printf("Positie currency symbol precedes?: [%d]\n",lc->p_cs_precedes); printf("Negative currency symbol precedes?: [%d]\n",lc->n_cs_precedes); strfmon(string, 100, "%i", fabs(money)); /* 1.234,56 EUR */ printf("[%s]\n", string); strfmon(string, 100, "%n", fabs(money)); /* 1.234.56 =E2=82=AC */ printf("[%s]\n", string); strfmon(string, 100, "%i", money); /* -1.234,56 EUR */ printf("[%s]\n", string); strfmon(string, 100, "%n", money); /* -1.234.56 =E2=82=AC */ printf("[%s]\n", string); return 0; } =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Current result =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 [robert@localhost ~]$ ./test=20 Currency symbol: [=E2=82=AC] International currency symbol: [EUR ] Currency decimal point: [,] Currency thousands sep: [.] Positie currency symbol precedes?: [1] Negative currency symbol precedes?: [1] [EUR 1.234,56] [=E2=82=AC 1.234,56] [-EUR 1.234,56] [-=E2=82=AC 1.234,56] =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Expected result =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 [robert@localhost ~]$ ./test=20 Currency symbol: [=E2=82=AC] International currency symbol: [EUR ] Currency decimal point: [,] Currency thousands sep: [.] Positie currency symbol precedes?: [0] Negative currency symbol precedes?: [0] [1.234,56 EUR] [1.234,56 =E2=82=AC] [-1.234,56 EUR] [-1.234,56 =E2=82=AC] =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Patch =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 [robert@localhost f28]$ cat my.patch=20 diff -urN glibc-2.27-78-g2b47bb9cba/localedata/locales/ca_ES glibc-2.27-78-g2b47bb9cba-p/localedata/locales/ca_ES --- glibc-2.27-78-g2b47bb9cba/localedata/locales/ca_ES 2018-10-26 21:21:37.670258359 +0200 +++ glibc-2.27-78-g2b47bb9cba-p/localedata/locales/ca_ES 2018-10-26 21:20:12.166974111 +0200 @@ -69,7 +69,7 @@ LC_MONETARY int_curr_symbol "EUR " -currency_symbol "" +currency_symbol "=E2=82=AC" mon_decimal_point "," mon_thousands_sep "." mon_grouping 3;3 @@ -77,9 +77,9 @@ negative_sign "-" int_frac_digits 2 frac_digits 2 -p_cs_precedes 1 +p_cs_precedes 0 p_sep_by_space 1 -n_cs_precedes 1 +n_cs_precedes 0 n_sep_by_space 1 p_sign_posn 1 n_sign_posn 1 =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 Note =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94 int_curr_symbol: The fourth character is the character used to separate the international currency symbol from the monetary quantity. --=20 You are receiving this mail because: You are on the CC list for the bug.