mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: printf doesn't respect locale
Date: Wed, 11 Sep 2019 12:01:59 +0200	[thread overview]
Message-ID: <20190911100159.GK22009@port70.net> (raw)
In-Reply-To: <539924f1-6cdb-0652-e9bf-4c5e6922823d@adelielinux.org>

* A. Wilcox <awilfox@adelielinux.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.


  reply	other threads:[~2019-09-11 10:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 16:31 Daniel Schoepe
2019-09-09 16:39 ` Daniel Schoepe
2019-09-09 16:51 ` Szabolcs Nagy
2019-09-09 17:55   ` Rich Felker
2019-09-09 17:54 ` Rich Felker
2019-09-10 16:00   ` Daniel Schoepe
2019-09-10 16:31     ` Szabolcs Nagy
2019-09-10 16:44       ` Tim Tassonis
2019-09-10 17:30         ` Rich Felker
2019-09-10 17:10       ` Daniel Schoepe
2019-09-10 17:33         ` Rich Felker
2019-09-10 18:43         ` Szabolcs Nagy
2019-09-10 21:55           ` A. Wilcox
2019-09-11 10:01             ` Szabolcs Nagy [this message]
2019-09-11 10:07               ` Jens Gustedt
2019-09-11 11:44                 ` Rich Felker
2019-09-11 12:53                   ` Jens Gustedt
2019-09-11 13:47                     ` Rich Felker
2019-09-11 15:15                       ` Jens Gustedt
2019-09-11 15:38                         ` Rich Felker
2019-09-11 18:08                           ` Jens Gustedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190911100159.GK22009@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).