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

Carlos O'Donell carlos@redhat.com
Thu Feb 12 17:13:00 GMT 2015


On 02/12/2015 11:08 AM, Rich Felker wrote:
> One more thing -- in the absence of ANY LC_*/LANG vars being set,
> POSIX leaves the default locale for setlocale(x, "")
> implementation-defined. Would it be justifiable to make C.UTF-8 the
> default in this case instead of plain C, so that suppression of UTF-8
> support never happens accidentally (e.g. when stripping the
> environment for security), only by explicitly setting LC_ALL=C or
> similar?

That is a difficult question. I don't have enough experience to say
one way or the other. However, as maintainer for Fedora I have the
ability to decide in some way for the distribution. My preference
would be for the default to be C.UTF-8, this way python3 and others
could rely on UTF-8 even in stripped environments. The goal for this
discussion and change being to produce builtin UTF-8 support that
doesn't just disappear.

Cheers,
Carlos.



More information about the Libc-alpha mailing list