public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] LC_ locale settings for UK / GB.
@ 2009-07-10 21:48 Stroller
  2009-07-10 23:02 ` Peter Ruskin
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Stroller @ 2009-07-10 21:48 UTC (permalink / raw
  To: gentoo-user

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.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] LC_ locale settings for UK / GB.
  2009-07-10 21:48 [gentoo-user] LC_ locale settings for UK / GB Stroller
@ 2009-07-10 23:02 ` Peter Ruskin
  2009-07-10 23:19   ` [gentoo-user] " walt
  2009-07-10 23:30   ` [gentoo-user] " Stroller
  2009-07-10 23:05 ` [gentoo-user] " walt
  2009-07-11  3:49 ` ABCD
  2 siblings, 2 replies; 11+ messages in thread
From: Peter Ruskin @ 2009-07-10 23:02 UTC (permalink / raw
  To: gentoo-user

On Friday 10 July 2009, Stroller wrote:
> 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,
>

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

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

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.2_rc33			kernel-2.6.28-gentoo-r5
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(Gentoo: 4.3.2-r3
KDE: 3.5.9					Qt: 3.3.8b
========================================================================



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-10 21:48 [gentoo-user] LC_ locale settings for UK / GB Stroller
  2009-07-10 23:02 ` Peter Ruskin
@ 2009-07-10 23:05 ` walt
  2009-07-10 23:32   ` Stroller
  2009-07-11  3:49 ` ABCD
  2 siblings, 1 reply; 11+ messages in thread
From: walt @ 2009-07-10 23:05 UTC (permalink / raw
  To: gentoo-user

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)





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-10 23:02 ` Peter Ruskin
@ 2009-07-10 23:19   ` walt
  2009-07-10 23:30   ` [gentoo-user] " Stroller
  1 sibling, 0 replies; 11+ messages in thread
From: walt @ 2009-07-10 23:19 UTC (permalink / raw
  To: gentoo-user

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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] LC_ locale settings for UK / GB.
  2009-07-10 23:02 ` Peter Ruskin
  2009-07-10 23:19   ` [gentoo-user] " walt
@ 2009-07-10 23:30   ` Stroller
  1 sibling, 0 replies; 11+ messages in thread
From: Stroller @ 2009-07-10 23:30 UTC (permalink / raw
  To: gentoo-user


On 11 Jul 2009, at 00:02, Peter Ruskin wrote:
>> ...
>> This doc refers to a /etc/env.d/02locale file ...
>
> This is what my 02locale file says:
> LANG="en_GB"
> LC_COLLATE="POSIX"
> LC_CTYPE="POSIX"
> LC_ALL="en_GB"
>
> I set LC_COLLATE and LC_CTYPE to "POSIX" some time ago to make
> konqueror sort the way I expect.

Thanks. That seems to have got rid of k3b's message of complaint,  
although it seemed to require running `env-update`, not merely logging  
out & back in again.

Stroller. 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-10 23:05 ` [gentoo-user] " walt
@ 2009-07-10 23:32   ` Stroller
  0 siblings, 0 replies; 11+ messages in thread
From: Stroller @ 2009-07-10 23:32 UTC (permalink / raw
  To: gentoo-user


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.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-10 21:48 [gentoo-user] LC_ locale settings for UK / GB Stroller
  2009-07-10 23:02 ` Peter Ruskin
  2009-07-10 23:05 ` [gentoo-user] " walt
@ 2009-07-11  3:49 ` ABCD
  2009-07-11 18:35   ` walt
  2 siblings, 1 reply; 11+ messages in thread
From: ABCD @ 2009-07-11  3:49 UTC (permalink / raw
  To: gentoo-user

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-11  3:49 ` ABCD
@ 2009-07-11 18:35   ` walt
  2009-07-11 20:13     ` Stroller
  0 siblings, 1 reply; 11+ messages in thread
From: walt @ 2009-07-11 18:35 UTC (permalink / raw
  To: gentoo-user

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?




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-11 18:35   ` walt
@ 2009-07-11 20:13     ` Stroller
  2009-07-11 21:02       ` walt
  2009-07-13 22:35       ` [gentoo-user] " ABCD
  0 siblings, 2 replies; 11+ messages in thread
From: Stroller @ 2009-07-11 20:13 UTC (permalink / raw
  To: gentoo-user


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.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: LC_ locale settings for UK / GB.
  2009-07-11 20:13     ` Stroller
@ 2009-07-11 21:02       ` walt
  2009-07-13 22:35       ` [gentoo-user] " ABCD
  1 sibling, 0 replies; 11+ messages in thread
From: walt @ 2009-07-11 21:02 UTC (permalink / raw
  To: gentoo-user

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.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-user]  Re: Re: LC_ locale settings for UK / GB.
  2009-07-11 20:13     ` Stroller
  2009-07-11 21:02       ` walt
@ 2009-07-13 22:35       ` ABCD
  1 sibling, 0 replies; 11+ messages in thread
From: ABCD @ 2009-07-13 22:35 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stroller wrote:

> 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.

That's what I was trying to say: set LANG always, and only set LC_* if you 
need to override a value.  If you need to override everything, (for 
instance, to turn off localization), you can set LC_ALL.  Usually, the only 
time you want to set LC_ALL is when you want LC_ALL=C (or, equivalently, 
LC_ALL=POSIX), which effectively disables internationalization/localization.

- -- 
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkpbtsQACgkQOypDUo0oQOrCAgCeINVxuzRZxTmZnfqw7Pti479M
5/UAnRgus9CF4v1SUJ9S3KlfVUcwKJZ/
=g0jU
-----END PGP SIGNATURE-----





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-07-13 22:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 21:48 [gentoo-user] LC_ locale settings for UK / GB Stroller
2009-07-10 23:02 ` Peter Ruskin
2009-07-10 23:19   ` [gentoo-user] " walt
2009-07-10 23:30   ` [gentoo-user] " Stroller
2009-07-10 23:05 ` [gentoo-user] " walt
2009-07-10 23:32   ` Stroller
2009-07-11  3:49 ` ABCD
2009-07-11 18:35   ` walt
2009-07-11 20:13     ` Stroller
2009-07-11 21:02       ` walt
2009-07-13 22:35       ` [gentoo-user] " ABCD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox