From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Subject: Re: How to set UTF-8 as default
Date: Thu, 2 Jun 2016 19:10:01 +0200 [thread overview]
Message-ID: <20160602171001.GA10492@voyager> (raw)
In-Reply-To: <CAJpZQQ4e7ZRZASLhiFFnLJnjS92jvgORq_-02abetf9Qtgfpuw@mail.gmail.com>
On Thu, Jun 02, 2016 at 05:40:54PM +0200, Remko Tronçon wrote:
> So, if I understand correctly, any program that expects `nl_langinfo`
> to return the locale set through environment variables (or other
> platform-specific ways) should call setlocale(LC_*, "") before
> querying the locale; libc/musl/... will not trigger this registration
> itself.
>
A libc that did that wouldn't be ISO-C compliant, because ISO-C says
that the initial locale has to be "C".
I will often just call setlocale(LC_ALL, ""); at the start of the
program, as that saves me the headache of selecting all the correct
locale categories for my program.
> thanks!
> Remko
Ciao,
Markus
next prev parent reply other threads:[~2016-06-02 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 11:05 Remko Tronçon
2016-06-02 14:50 ` FRIGN
2016-06-02 15:03 ` Rich Felker
2016-06-02 15:01 ` Rich Felker
2016-06-02 15:40 ` Remko Tronçon
2016-06-02 17:10 ` Markus Wichmann [this message]
2016-06-02 17:32 ` Rich Felker
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=20160602171001.GA10492@voyager \
--to=nullplan@gmx.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).