This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should glibc provide a builtin C.UTF-8 locale?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]