From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14643 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: printf doesn't respect locale Date: Wed, 11 Sep 2019 12:01:59 +0200 Message-ID: <20190911100159.GK22009@port70.net> References: <20190909175452.GO9017@brightrain.aerifal.cx> <20190910163143.GI22009@port70.net> <20190910184312.GJ22009@port70.net> <539924f1-6cdb-0652-e9bf-4c5e6922823d@adelielinux.org> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37505"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-14659-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 11 12:02:15 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1i7zS2-0009dg-Pz for gllmg-musl@m.gmane.org; Wed, 11 Sep 2019 12:02:14 +0200 Original-Received: (qmail 1515 invoked by uid 550); 11 Sep 2019 10:02:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1494 invoked from network); 11 Sep 2019 10:02:11 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <539924f1-6cdb-0652-e9bf-4c5e6922823d@adelielinux.org> Xref: news.gmane.org gmane.linux.lib.musl.general:14643 Archived-At: * A. Wilcox [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. >=20 >=20 > While reliability is important, I disagree that reliability should > *exclude* UI. >=20 > 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. >=20 > We at Ad=C3=A9lie 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. >=20 > 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.