Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160602171001.GA10492@voyager>
Date: Thu, 2 Jun 2016 19:10:01 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: How to set UTF-8 as default

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

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.