From: "Remko Tronçon" <remko@el-tramo.be>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: How to set UTF-8 as default
Date: Thu, 2 Jun 2016 17:40:54 +0200 [thread overview]
Message-ID: <CAJpZQQ4e7ZRZASLhiFFnLJnjS92jvgORq_-02abetf9Qtgfpuw@mail.gmail.com> (raw)
In-Reply-To: <20160602150154.GJ10893@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Hi Rich,
Thanks for your explanation.
Just call setlocale(LC_CTYPE, ""). This is the only way a correct
> program should ever use setlocale.
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.
NULL is not the same thing as "". Passing NULL as the second argument
> to setlocale simply queries the current locale name. It does not setup
> the locale.
>
Right, I was just pointing out that the locale I tried to set in env
variables wasn't
being reported as the current locale by setlocale().
thanks!
Remko
[-- Attachment #2: Type: text/html, Size: 1361 bytes --]
next prev parent reply other threads:[~2016-06-02 15:40 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 [this message]
2016-06-02 17:10 ` Markus Wichmann
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=CAJpZQQ4e7ZRZASLhiFFnLJnjS92jvgORq_-02abetf9Qtgfpuw@mail.gmail.com \
--to=remko@el-tramo.be \
--cc=dalias@libc.org \
--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).