Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190911100159.GK22009@port70.net>
Date: Wed, 11 Sep 2019 12:01:59 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: printf doesn't respect locale

* A. Wilcox <awilfox@...lielinux.org> [2019-09-10 16:55:52 -0500]:
> On 10/09/2019 13:43, Szabolcs Nagy wrote:
> > i think libc should mainly aim for reliability of systems
> > software and not for friendliness of ui applications.
> 
> 
> While reliability is important, I disagree that reliability should
> *exclude* UI.
> 
> musl already causes crashes or other unexpected behaviour when system
> software isn't written correctly.  That's a feature, not a bug.  If musl
> supporting ',' as radix point causes bad software to crash, then that
> software needs to be fixed.
> 
> We at Adélie field requests nearly every day wondering why our system
> doesn't support other locales for things like sort, LC_NUMERIC,
> LC_MONETARY, etc etc.  The only reason I haven't been more active in
> developing musl's locale support is because I'm too busy doing other
> important work.
> 
> 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.

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.

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.