This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Should glibc provide a builtin C.UTF-8 locale?
- From: Rich Felker <dalias at libc dot org>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 17 Feb 2015 11:31:22 -0500
- Subject: Re: Should glibc provide a builtin C.UTF-8 locale?
- Authentication-results: sourceware.org; auth=none
- References: <54DB8243 dot 3050903 at redhat dot com> <54DBFA8D dot 8030107 at cs dot ucla dot edu> <20150217112942 dot GJ544 at vapier> <54E36429 dot 7070809 at cs dot ucla dot edu>
On Tue, Feb 17, 2015 at 07:54:17AM -0800, Paul Eggert wrote:
> Mike Frysinger wrote:
> >i also vaguely recall OS X supports something like this ? should
> >we proactively attempt to harmonize here ?
>
> In OS X, the C locale uses UTF-8 but things are seriously confused:
> nl_langinfo(CODESET) returns "US-ASCII" and MB_CUR_MAX is 1, among
> other things. See:
These statements seem contradictory. If they were true it would mean
any use of wc[r]tomb was a potential buffer overflow. But apparently
it's not true. The following link you gave:
> http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00342.html
clarifies that OSX's C locale is just ASCII. It's just that the OSX
user-facing applications don't use the locale system at all. They
ignore it and do their own UTF-8 thing.
Rich