[gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-11 Thread walt

On 07/10/2009 08:49 PM, ABCD wrote:

...
Because I'm seeing some strange things in this thread, let me elucidate
as to what the various LANG/LC_* variables do:

LANG
 sets the default for LC_*, if unset, defaults to C

LC_CTYPE [charset]
LC_NUMERIC [number format]
LC_TIME [time format]
LC_COLLATE [sort order]
LC_MONETARY [money format]
LC_MESSAGES [message language]
LC_PAPER [paper size]
LC_NAME [given/family name format]
LC_ADDRESS [mailing address format]
LC_TELEPHONE [country code, etc.]
LC_MEASUREMENT [US customary, SI, etc.]
LC_IDENTIFICATION [???]
 Used as their names suggest, for the various things that can be
 done with locales.  Default to $LANG, if $LANG is unset, defaults
 to C.

LC_ALL
 Override for LC_*.  If LC_ALL is set, then LC_* is ignored, and the
 value of LC_ALL is used for everything. *Do not* set this in env.d
 unless you know exactly what you are doing.  (Setting LC_ALL=C to
 disable all locale settings, for instance).


Thanks for the clarification.  The only reason I can think of for *not*
setting LC_ALL is that some users on a multi-user system might want to
use a different language. Am I missing something else important?




Re: [gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-11 Thread Stroller


On 11 Jul 2009, at 19:35, walt wrote:


On 07/10/2009 08:49 PM, ABCD wrote:

...
Because I'm seeing some strange things in this thread, let me  
elucidate

as to what the various LANG/LC_* variables do:

LANG
sets the default for LC_*, if unset, defaults to C

LC_CTYPE [charset]
LC_NUMERIC [number format]
LC_TIME [time format]
LC_COLLATE [sort order]
LC_MONETARY [money format]
LC_MESSAGES [message language]
LC_PAPER [paper size]
LC_NAME [given/family name format]
LC_ADDRESS [mailing address format]
LC_TELEPHONE [country code, etc.]
LC_MEASUREMENT [US customary, SI, etc.]
LC_IDENTIFICATION [???]
Used as their names suggest, for the various things that can be
done with locales.  Default to $LANG, if $LANG is unset, defaults
to C.

LC_ALL
Override for LC_*.  If LC_ALL is set, then LC_* is ignored, and  
the
value of LC_ALL is used for everything. *Do not* set this in  
env.d

unless you know exactly what you are doing.  (Setting LC_ALL=C to
disable all locale settings, for instance).


Thanks for the clarification.  The only reason I can think of for  
*not*

setting LC_ALL is that some users on a multi-user system might want to
use a different language. Am I missing something else important?


I'm reading this as to *only* set LANG instead. I'm assuming there are  
occasions upon which a single program or package (at installation  
time, or perhaps in a run script) may wish to over-ride only some of  
the LC_* variables.


IE:

On 11 Jul 2009, at 00:02, Peter Ruskin wrote:

This is what my 02locale file says:
LANG=en_GB
LC_COLLATE=POSIX
LC_CTYPE=POSIX
LC_ALL=en_GB


The last 3 lines should be removed?

If I do so:
$ cat  /etc/env.d/02locale
LANG=en_GB
$

k3b gives no errors - in fact I get a No problems found in system  
configuration pop-up instead - on startup.


Stroller.




[gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-11 Thread walt

On 07/11/2009 01:13 PM, Stroller wrote:




On 07/10/2009 08:49 PM, ABCD wrote:

...
Because I'm seeing some strange things in this thread, let me elucidate
as to what the various LANG/LC_* variables do:

LANG
sets the default for LC_*, if unset, defaults to C



I'm reading this as to *only* set LANG instead...


Yes of course, I didn't catch that the first time.




[gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-10 Thread walt

On 07/10/2009 02:48 PM, Stroller wrote:
 ...

Solution: To properly set the locale charset make sure the LC_*
environment variables are set...


Googling LC_* environment variables turns up this doc:
http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap3

I assume this document is correct  up to date?
(and is not superseded by the LINGUAS=en_GB en that I have in make.conf)


As far as I know the LINGUAS variable is used only during the building
of packages, and is not related to the LANGUAGE or LC variables. If I'm
wrong then someone correct me, please.  I've been vague about this for
years.

To discover what locales you have in /usr/share/locale, type 'locale -a'
at a shell prompt. If you emerged glibc with your LINGUAS variable set
to en_GB en then you may have only English-oriented locales listed,

In any case you should easily spot what you need in the output of
locale -a | grep GB.

Unless you have some very arcane lanuage needs you can just set the
value of LC_ALL instead of worrying about nine different ones.

Here is my /etc/env.d/02locale as an example from the colonies, which
of course is unsuitable for a truly civilized country:

$cat /etc/env.d/02locale
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LINGUAS=
ALL_LINGUAS=

The redundancy in that file is probably overkill because I didn't know
exactly what to include.  It may well be that some of those don't need
to be there, and someone who knows will enlighten us both :o)





[gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-10 Thread walt

On 07/10/2009 04:02 PM, Peter Ruskin wrote:


...
I set LC_COLLATE and LC_CTYPE to POSIX some time ago to make
konqueror sort the way I expect.


We posted our responses at the same time, apparently.  Where did
you learn that POSIX is an appropriate value for those variables?
I need to read whatever docs you can recommend.





Re: [gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-10 Thread Stroller


On 11 Jul 2009, at 00:05, walt wrote:

On 07/10/2009 02:48 PM, Stroller wrote:
...



Googling LC_* environment variables turns up this doc:
http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap3
...

Unless you have some very arcane lanuage needs you can just set the
value of LC_ALL instead of worrying about nine different ones.


FWIW the linked Gentoo Linux Localization Guide specifically warns  
against this:


Warning: Using LC_ALL is strongly discouraged as it can't be  
overridden later on. Please use it only when testing and never set it  
in a startup file.


Stroller.




[gentoo-user] Re: LC_ locale settings for UK / GB.

2009-07-10 Thread ABCD
Stroller wrote:

 Hi there,
 
 I want to try burning a DVD using k3b and when it starts up it
 complains:
 
 System locale charset is ANSI_X3.4-1968
 Your system's locale charset (i.e. the charset used to encode
 filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this
 has been done intentionally. Most likely the locale is not set at
 all.
 An invalid setting will result in problems when creating data
 projects.
 Solution: To properly set the locale charset make sure the LC_*
 environment variables are set. Normally the distribution setup tools
 take care of this.
 
 
 Googling LC_* environment variables turns up this doc:
 http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap3
 
 I assume this document is correct  up to date?
 (and is not superseded by the LINGUAS=en_GB en that I have in
 make.conf)
 
 This doc refers to a /etc/env.d/02locale file - I assume I have to
 create that by hand? The file does not exist at present. I guess this
 is the kind of thing I'd kinda expect you to create by symlinking to /
 usr/share/linguas/England or something.
 
 Finally, does anyone have the correct LANG and LC_COLLATE settings for
 the United Kingdom, please? I assume that again something starting
 en_GB is used.
 
 Do I need to set ALL LC_* variables (the guide lists 9 of them) or
 just those 2?
 
 This server is headless, so I'm using X11 over ssh - kcontrol's left-
 hand pane is blank.
 
 Thanks in advance for any help,
 
 Stroller.

Because I'm seeing some strange things in this thread, let me elucidate
as to what the various LANG/LC_* variables do:

LANG
sets the default for LC_*, if unset, defaults to C

LC_CTYPE [charset]
LC_NUMERIC [number format]
LC_TIME [time format]
LC_COLLATE [sort order]
LC_MONETARY [money format]
LC_MESSAGES [message language]
LC_PAPER [paper size]
LC_NAME [given/family name format]
LC_ADDRESS [mailing address format]
LC_TELEPHONE [country code, etc.]
LC_MEASUREMENT [US customary, SI, etc.]
LC_IDENTIFICATION [???]
Used as their names suggest, for the various things that can be
done with locales.  Default to $LANG, if $LANG is unset, defaults
to C.

LC_ALL
Override for LC_*.  If LC_ALL is set, then LC_* is ignored, and the
value of LC_ALL is used for everything. *Do not* set this in env.d
unless you know exactly what you are doing.  (Setting LC_ALL=C to
disable all locale settings, for instance).

I hope this helps resolve any confusion.  If you want to see what the
current values of each of these variables is, including overrides, run 
`locale`.

-- 
ABCD