From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10017 invoked by alias); 26 Oct 2018 15:16:01 -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 9348 invoked by uid 48); 26 Oct 2018 15:15:38 -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 15:16: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/msg00086.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23791 --- Comment #12 from Robert Buj --- Hi Sergi, By default, grouping is disabled in locale.currency(val, symbol=3DTrue, grouping=3DFalse, international=3DFalse) https://docs.python.org/3/library/locale.html#locale.currency Current result: >>> import locale >>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8') 'ca_ES.UTF-8' >>> locale.currency(-1234.5, grouping=3DTrue) '-=E2=82=AC 1.234,50' >>> locale.currency(-1234.5, grouping=3DTrue, international=3DTrue) '-EUR 1.234,50' >>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8') 'ca_ES.UTF-8' >>> locale.currency(-1234.5, grouping=3DTrue) '=E2=82=AC 1.234,50' >>> locale.currency(-1234.5, grouping=3DTrue, international=3DTrue) 'EUR 1.234,50' Expected result: >>> import locale >>> locale.setlocale(locale.LC_ALL, 'ca_ES.UTF-8') 'ca_ES.UTF-8' >>> locale.currency(-1234.5, grouping=3DTrue) '-1.234,50 =E2=82=AC' >>> locale.currency(-1234.5, grouping=3DTrue, international=3DTrue) '-1.234,50 EUR' >>> locale.currency(1234.5, grouping=3DTrue) '1.234,50 =E2=82=AC' >>> locale.currency(-1234.5, grouping=3DTrue, international=3DTrue) '1.234,50 EUR' The currency symbol succeeds the value. I agree with this: p_cs_precedes 0 <<-- replace 1 with 0 n_cs_precedes 0 <<-- replace 1 with 0 You should also remove blank space in int_curr_symbol: int_curr_symbol "EUR" <<-- replace "EUR " with "EUR" You don't need to escape for the currency_symbol: currency_symbol "=E2=82=AC" <<-- replace "" with "=E2=82=AC" LC_NUMERIC is not used for LC_MONETARY, but you can keep this change for numeric formatting. grouping 3;3 <<-- replace 0;0 with 3;3 Regards, Robert --=20 You are receiving this mail because: You are on the CC list for the bug.