FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 02-19-2012, 07:03 PM
Ulrich Mueller
 
Default LANG=en_GB.UTF-8 by default

>>>>> On Sun, 19 Feb 2012, Ben wrote:

>>> In my opinion we should set a default environment with the
>>> following values:
>>
>>> LANG=en_US.UTF-8
>>> LC_ALL=
>>> LC_COLLATE=C
>>
>>> This offers the best default options to the majority of users, and
>>> is easy to customize for those who wish to use another locale.
>>
>> At least, LC_NUMERIC=C should be added to this, otherwise numbers
>> will be formatted with commas as thousands separators.
>>
>> Also en_US.UTF-8 for LC_MEASUREMENT and LC_PAPER means imperial
>> units and letter paper, which isn't optimal for users outside of
>> the U.S.

> I think those users (and that includes myself) should then set LANG
> to something more appropriate to their use case.

And why should we set the default to an US locale then? IMHO something
like

LANG=C
LC_CTYPE=en_US.utf8

would be much less intrusive if you just want UTF-8, without
influencing other i18n variables.

Ulrich
 
Old 02-19-2012, 11:11 PM
William Hubbs
 
Default LANG=en_GB.UTF-8 by default

On Sun, Feb 19, 2012 at 11:56:40PM +0800, Ben wrote:
> On 19 February 2012 23:14, Ulrich Mueller <ulm@gentoo.org> wrote:
> >>>>>> On Sun, 19 Feb 2012, Ben *wrote:
> >
> >> In my opinion we should set a default environment with the following
> >> values:
> >
> >> LANG=en_US.UTF-8
> >> LC_ALL=
> >> LC_COLLATE=C
> >
> >> This offers the best default options to the majority of users, and
> >> is easy to customize for those who wish to use another locale.
> >
> > At least, LC_NUMERIC=C should be added to this, otherwise numbers will
> > be formatted with commas as thousands separators.
> >
> > Also en_US.UTF-8 for LC_MEASUREMENT and LC_PAPER means imperial units
> > and letter paper, which isn't optimal for users outside of the U.S.
> >
> > Ulrich
> >
>
> I think those users (and that includes myself) should then set LANG to
> something more appropriate to their use case.

According to our localization guide, there is a safe default that forces
UTF-8 characters but doesn't force any language. I have the following
single line in /etc/env.d/02locale:

LC_CTYPE=en_US.UTF-8

What do you think?

William
 
Old 02-20-2012, 02:07 AM
Kerin Millar
 
Default LANG=en_GB.UTF-8 by default

On 20/02/2012 00:11, William Hubbs wrote:

On Sun, Feb 19, 2012 at 11:56:40PM +0800, Ben wrote:

On 19 February 2012 23:14, Ulrich Mueller<ulm@gentoo.org> wrote:

On Sun, 19 Feb 2012, Ben wrote:



In my opinion we should set a default environment with the following
values:



LANG=en_US.UTF-8
LC_ALL=
LC_COLLATE=C



This offers the best default options to the majority of users, and
is easy to customize for those who wish to use another locale.


At least, LC_NUMERIC=C should be added to this, otherwise numbers will
be formatted with commas as thousands separators.

Also en_US.UTF-8 for LC_MEASUREMENT and LC_PAPER means imperial units
and letter paper, which isn't optimal for users outside of the U.S.

Ulrich



I think those users (and that includes myself) should then set LANG to
something more appropriate to their use case.


According to our localization guide, there is a safe default that forces
UTF-8 characters but doesn't force any language. I have the following
single line in /etc/env.d/02locale:

LC_CTYPE=en_US.UTF-8



That looks good but perhaps it should also define LANG=POSIX, which is
similar to Ulrich's proposal. Something like:


# To configure for your region, set LANG to an appropriate locale, then
comment

# or remove LC_CTYPE. Run "locale -a" to obtain a list of available locales.
LANG=POSIX
LC_CTYPE=en_US.utf8

I know that adding LANG=POSIX doesn't do anything in this case but I
have a feeling that its presence would be instructive to new users. If a
user is asked to configure something which isn't present, it often
generates questions which might otherwise be avoided. I've changed
"en_US.UTF-8" to "en_US.utf8" there for similar reasons.


Not to mention that, if one is curious and searches for "posix locale"
via Google, the first link is for the Open Group specification


I reckon that this, along with some basic information in the handbook,
would be a step in the right direction.


--Kerin
 
Old 02-20-2012, 06:47 AM
Fabian Groffen
 
Default LANG=en_GB.UTF-8 by default

On 20-02-2012 03:07:33 +0000, Kerin Millar wrote:
> I know that adding LANG=POSIX doesn't do anything in this case but I
> have a feeling that its presence would be instructive to new users. If a
> user is asked to configure something which isn't present, it often
> generates questions which might otherwise be avoided. I've changed
> "en_US.UTF-8" to "en_US.utf8" there for similar reasons.

I don't understand. UTF-8 is the codeset, that utf8 is recognised as
the same thing is IMO a GNUism. glibc understands "UTF-8" perfectly
fine these days, so it should preferably be used instead. (Even the
man-page, utf8(7), suggests that.)


--
Fabian Groffen
Gentoo on a different level
 
Old 02-20-2012, 11:27 AM
Kerin Millar
 
Default LANG=en_GB.UTF-8 by default

On 20/02/2012 07:47, Fabian Groffen wrote:

On 20-02-2012 03:07:33 +0000, Kerin Millar wrote:

I know that adding LANG=POSIX doesn't do anything in this case but I
have a feeling that its presence would be instructive to new users. If a
user is asked to configure something which isn't present, it often
generates questions which might otherwise be avoided. I've changed
"en_US.UTF-8" to "en_US.utf8" there for similar reasons.


I don't understand. UTF-8 is the codeset, that utf8 is recognised as
the same thing is IMO a GNUism. glibc understands "UTF-8" perfectly
fine these days, so it should preferably be used instead. (Even the
man-page, utf8(7), suggests that.)



Most users don't read man pages. The rationale was that the user can
copy-paste exactly what they see from "locale -a", which might diminish
the number of questions asked about it via mainstream support channels,
as well as simplifying the instructions in the sample comment. It was
just a thought; no big deal.


--Kerin
 

Thread Tools




All times are GMT. The time now is 12:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org