|
Date: Mon, 9 Sep 2019 13:55:56 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: printf doesn't respect locale On Mon, Sep 09, 2019 at 06:51:00PM +0200, Szabolcs Nagy wrote: > * Daniel Schoepe <daniel@...oepe.org> [2019-09-09 17:31:01 +0100]: > > I think I found a discrepancy between musl's behavior and the POSIX standard: > > > > According to the POSIX standard, the decimal separator used when using > > printf to print floating point numbers should come from the locale > > (https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html): > > > > "The radix character is defined in the current locale (category > > LC_NUMERIC). In the POSIX locale, or in a locale where the radix > > character is not defined, the radix character shall default to a > > <period> ( '.' )." > > > > However, it seems that in musl, a period is always used for printing > > floating point numbers. For example, the following program prints > > "12.0" instead of "12,0" (which is printed when using GNU libc): > > musl is posix conform. > > it just only supports LC_NUMERIC locales where the radix > character is a period. > > if you see a musl based system where LC_NUMERIC is defined > otherwise then report the issue to the integrator or > distributor of that system. I don't understand what that would mean. musl's locale definition system simply has no way to represent different radix point characters, so there cant' be such an integration/distribution. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.