Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Sep 2019 12:07:22 +0200
From: Jens Gustedt <jens.gustedt@...ia.fr>
Cc: musl@...ts.openwall.com
Subject: Re: printf doesn't respect locale

Hello Szabolcs,

On Wed, 11 Sep 2019 12:01:59 +0200 Szabolcs Nagy <nsz@...t70.net> wrote:

> > We would be *extremely* disappointed if LC_NUMERIC would never be
> > supported in upstream musl.  We would have to maintain a patch to
> > add LC_NUMERIC support when the rest of musl's locale support is
> > developed.  
> 
> i consider this a posix/iso c bug.

I agree

> there is a need for printf with fixed C.UTF-8 locale in
> library code that implements a file format, language or
> protocol that cannot be locale dependent.
> 
> in iso c there is no way to get this.
> 
> in posix 2008 you have to jump through very bizarre hoops
> to get it (in a slow and resource wasting way).
> 
> so the world is full of printf users that just expect
> fixed C.UTF-8 locale and hope nobody calls setlocale.
> 
> telling ppl that their code is wrong does not help unless
> you provide an alternative, but introducing new api for
> this would not be portable.

I think that WG14 would be happy to hear any suggestions how we could
get out of this trap, a proposal for C2x would even be better.


Thanks
Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Content of type "application/pgp-signature" skipped

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.