public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/16067] New: int_curr_symbol processed incorrectly
@ 2013-10-20 21:50 van.de.bugger at gmail dot com
  2014-05-21 13:30 ` [Bug localedata/16067] " myllynen at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: van.de.bugger at gmail dot com @ 2013-10-20 21:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16067

            Bug ID: 16067
           Summary: int_curr_symbol processed incorrectly
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: minor
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: van.de.bugger at gmail dot com
                CC: libc-locales at sourceware dot org

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html:

> int_curr_symbol
>    The international currency symbol. The operand shall be a four-character
> string, with the first three characters containing the alphabetic
> international currency symbol. The international currency symbol should be
> chosen in accordance with those specified in the ISO 4217 standard. The fourth
> character shall be the character used to separate the international currency
> symbol from the monetary quantity.

Note: they require 4-CHARACTER string.

In my custom locale I have a line:

> LC_MONETARY
> int_curr_symbol     "RUB<U00A0>"

U00A0 is a non-breaking space. It is one character.

When building such a locale, localedef issues a warning:

> LC_MONETARY: value of field `int_curr_symbol' has wrong length

Being used, it prodices wrong result:

> RUB�10 999.95

Note the wrong character between currency name and quantity. Looks like
localedef uses only 4 BYTES of int_curr_symbol, while it should use 4
CHARACTERS.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-19897-listarch-glibc-bugs=sources.redhat.com@sourceware.org Mon Oct 21 01:35:47 2013
Return-Path: <glibc-bugs-return-19897-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 31473 invoked by alias); 21 Oct 2013 01:35:47 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 31423 invoked by uid 48); 21 Oct 2013 01:35:42 -0000
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15539] nftw with FTW_CHDIR doesn't restore cwd upon cancellation
Date: Mon, 21 Oct 2013 01:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: libc
X-Bugzilla-Version: 2.18
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: bugdal at aerifal dot cx
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-15539-131-1SWdOpCDAF@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-15539-131@http.sourceware.org/bugzilla/>
References: <bug-15539-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-10/txt/msg00256.txt.bz2
Content-length: 936

https://sourceware.org/bugzilla/show_bug.cgi?id\x15539

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
nftw is not even required to be thread-safe, so per the standard such usage
invokes undefined behavior. I suspect glibc's nftw implementation aims to
provide the maximal possible thread-safety, but using chdir is not really
compatible with multithreaded use, so it should not be used in multithreaded
programs with FTW_CHDIR. My inclination would be just to recommend against use
of nftw altogether; with the *at functions, a much better API for filesystem
tree walking is possible.

--
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/16067] int_curr_symbol processed incorrectly
  2013-10-20 21:50 [Bug localedata/16067] New: int_curr_symbol processed incorrectly van.de.bugger at gmail dot com
@ 2014-05-21 13:30 ` myllynen at redhat dot com
  2014-06-13 12:37 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: myllynen at redhat dot com @ 2014-05-21 13:30 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16067

Marko Myllynen <myllynen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |myllynen at redhat dot com

--- Comment #1 from Marko Myllynen <myllynen at redhat dot com> ---
Using Unicode code points instead of letters should solve your issue:

localhost:~> grep int_curr_symbol te_ST
int_curr_symbol      "<U0052><U0055><U0042><U0020>"
localhost:~> export I18NPATH=./locale-test/
localhost:~> export LOCPATH=./locale-test/ 
localhost:~> mkdir -p $LOCPATH
localhost:~> localedef --no-archive -f UTF-8 -i te_ST $I18NPATH/te_ST.UTF-8    
localhost:~> LC_ALL=te_ST.UTF-8 locale -k int_curr_symbol
int_curr_symbol="RUB "

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/16067] int_curr_symbol processed incorrectly
  2013-10-20 21:50 [Bug localedata/16067] New: int_curr_symbol processed incorrectly van.de.bugger at gmail dot com
  2014-05-21 13:30 ` [Bug localedata/16067] " myllynen at redhat dot com
@ 2014-06-13 12:37 ` fweimer at redhat dot com
  2014-10-28 11:07 ` van.de.bugger at gmail dot com
  2014-10-28 11:15 ` myllynen at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 12:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16067

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/16067] int_curr_symbol processed incorrectly
  2013-10-20 21:50 [Bug localedata/16067] New: int_curr_symbol processed incorrectly van.de.bugger at gmail dot com
  2014-05-21 13:30 ` [Bug localedata/16067] " myllynen at redhat dot com
  2014-06-13 12:37 ` fweimer at redhat dot com
@ 2014-10-28 11:07 ` van.de.bugger at gmail dot com
  2014-10-28 11:15 ` myllynen at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: van.de.bugger at gmail dot com @ 2014-10-28 11:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16067

--- Comment #2 from van.de.bugger at gmail dot com ---
> Using Unicode code points instead of letters should solve your issue:
> 
> localhost:~> grep int_curr_symbol te_ST
> int_curr_symbol      "<U0052><U0055><U0042><U0020>"

You are wrong. You use regular space U+0020. Use no-break space U+00A0 to
reproduce the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug localedata/16067] int_curr_symbol processed incorrectly
  2013-10-20 21:50 [Bug localedata/16067] New: int_curr_symbol processed incorrectly van.de.bugger at gmail dot com
                   ` (2 preceding siblings ...)
  2014-10-28 11:07 ` van.de.bugger at gmail dot com
@ 2014-10-28 11:15 ` myllynen at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: myllynen at redhat dot com @ 2014-10-28 11:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16067

--- Comment #3 from Marko Myllynen <myllynen at redhat dot com> ---
(In reply to van.de.bugger from comment #2)
> > Using Unicode code points instead of letters should solve your issue:
> > 
> > localhost:~> grep int_curr_symbol te_ST
> > int_curr_symbol      "<U0052><U0055><U0042><U0020>"
> 
> You use regular space U+0020. Use no-break space U+00A0 to reproduce the bug.

Ah, correct, then I indeed get the same result as you do.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-28 11:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-20 21:50 [Bug localedata/16067] New: int_curr_symbol processed incorrectly van.de.bugger at gmail dot com
2014-05-21 13:30 ` [Bug localedata/16067] " myllynen at redhat dot com
2014-06-13 12:37 ` fweimer at redhat dot com
2014-10-28 11:07 ` van.de.bugger at gmail dot com
2014-10-28 11:15 ` myllynen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).