[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#874160: src:glibc: default locale to C.UTF-8



On 2017-09-04 00:13, Adam Borowski wrote:
> On Sun, Sep 03, 2017 at 11:54:03PM +0200, Aurelien Jarno wrote:
> > On 2017-09-03 18:49, Adam Borowski wrote:
> > > Package: src:glibc
> > > Version: 2.24-17
> > > Severity: wishlist
> > > Tags: patch
> > > 
> > > Hi!
> > > Here's a simple patch set to change the default of setlocale(…, "") to
> > > C.UTF-8.  This is a drastically smaller change than altering the meaning of
> > > "C" to mean "C.UTF-8" that upstream is mulling over -- it affects only
> > > programs that already have locale support, when the user fails to set any.
> > 
> > Even is the change is small, that might still change the behavior of
> > some programs, so I am not sure we want to diverge from upstream and
> > other distributions here.
> > 
> > One example comes to my mind: initializing a postgresql database
> > cluster. When not using the --locale option this would cause the
> > database to use a non C locale, which has significant performance
> > impact.
> 
> In this case, this will change anyway when (if?) upstream goes forward with
> their version -- which sounds as if postgresql wants an explicit LC_ALL=C.
> Doesn't pg_createcluster inherit locale settings from the user who's
> invoking it (thus usually en_US.UTF-8 or whatever)?  Thus, in the vast

Or the root account when install postgresql using apt-get.

> majority of uses, there's no change, merely a certain way to force the C
> locate (unset LC_ALL LANG LC_CTYPE LC_...) won't work anymore.

That's correct. My point there is that the usual unset command will work
on all distributions except Debian.

Also that's just an example of a behavior change, I am sure there are
many more.

> As for diverging from upstream, lemme ask the guy behind the upstream
> proposal wiki page what's the inclusion status.  You probably have a wee bit
> better idea than me about upstream's workings, though.

As I said in my first, it's about diverging from upstream *and* from
other distributions. If a few other distributions use your patch as the
default, I am fine with that.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: