public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-amd64] locales questions
@ 2006-12-04 18:30 Mark Knecht
  2006-12-04 18:44 ` Bo Ørsted Andresen
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2006-12-04 18:30 UTC (permalink / raw
  To: gentoo-amd64

Hi,
   I don't understand locales, or not really. I get that they say
something about where the machine is running and what character
set/sets the machine should use, but that's as far as I go with it.
It's never been much of a problem.

   I unmasked the k3b_beta1.0 package and built it this morning to
look at a new feature. When I start the program I'm getting a message:

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.

   I'm going back looking at the Gentoo Quick Install Guide. It talks
about locales.build and locales.gen for recent version of glibc.
Section 2.37 at

http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml

However my AMD64 machine seems like it's either not set up or set up
for an old version of glibc:

lightning ~ # slocate locales.build
/etc/locales.build
/mnt/gentoo32/etc/locales.build
/usr/portage/sys-libs/glibc/files/locales.build
lightning ~ # slocate locales.gen
lightning ~ #

   Do I need to change things like the setup guide would have me do?

   I have no 'LC_' setting in make.conf nor do I see anything obvious
in /etc/conf.d.

   I'm very confused about this stuff anyway. Thanks in advance for being kind.

cheers,
Mark
-- 
gentoo-amd64@gentoo.org mailing list



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

* Re: [gentoo-amd64] locales questions
  2006-12-04 18:30 [gentoo-amd64] locales questions Mark Knecht
@ 2006-12-04 18:44 ` Bo Ørsted Andresen
  2006-12-04 19:33   ` Mark Knecht
  0 siblings, 1 reply; 8+ messages in thread
From: Bo Ørsted Andresen @ 2006-12-04 18:44 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

On Monday 04 December 2006 19:30, Mark Knecht wrote:
>    I don't understand locales, or not really. I get that they say
> something about where the machine is running and what character
> set/sets the machine should use, but that's as far as I go with it.
> It's never been much of a problem.
[SNIP]
> Solution: To properly set the locale charset make sure the LC_*
> environment variables are set. Normally the distribution setup tools
> take care of this.
>
>    I'm going back looking at the Gentoo Quick Install Guide. It talks
> about locales.build and locales.gen for recent version of glibc.
> Section 2.37 at
[SNIP]

It's properly covered in the Gentoo Localization Guide [1]. You need to 
move/convert your locales.build to a locale.gen, run `locale-gen` and make 
sure it doesn't generate any errors and set LANG in /etc/env.d/02locale...

If you need help you will have to post the contents of locale.gen and the 
output of `locale-gen`.

[1] http://www.gentoo.org/doc/en/guide-localization.xml

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-amd64] locales questions
  2006-12-04 18:44 ` Bo Ørsted Andresen
@ 2006-12-04 19:33   ` Mark Knecht
  2006-12-04 20:12     ` Bo Ørsted Andresen
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2006-12-04 19:33 UTC (permalink / raw
  To: gentoo-amd64

On 12/4/06, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Monday 04 December 2006 19:30, Mark Knecht wrote:
> >    I don't understand locales, or not really. I get that they say
> > something about where the machine is running and what character
> > set/sets the machine should use, but that's as far as I go with it.
> > It's never been much of a problem.
> [SNIP]
> > Solution: To properly set the locale charset make sure the LC_*
> > environment variables are set. Normally the distribution setup tools
> > take care of this.
> >
> >    I'm going back looking at the Gentoo Quick Install Guide. It talks
> > about locales.build and locales.gen for recent version of glibc.
> > Section 2.37 at
> [SNIP]
>
> It's properly covered in the Gentoo Localization Guide [1]. You need to
> move/convert your locales.build to a locale.gen, run `locale-gen` and make
> sure it doesn't generate any errors and set LANG in /etc/env.d/02locale...
>
> If you need help you will have to post the contents of locale.gen and the
> output of `locale-gen`.
>
> [1] http://www.gentoo.org/doc/en/guide-localization.xml
>
> --
> Bo Andresen

Hi Bo,
   First, thanks in advance. I really appreciate all your help. I
think I'll ask a few questions as I go along, if that's OK. Thanks
again.

   Reading the localization and quick install guides I've become a bit
more confused. The localization guide says the LC_* settings are done
in /etc/env.d/02locale but this doesn't exist here, not even after
running locale-gen:

lightning etc # ls /etc/env.d/
00basic         10libx11                  50gconf
75emul-linux-x86-compat
02distcc        10xkeyboard-config        50glib2                90games
03opengl        15openmotif-2.2           50gtk2                 99fltk-1.1
04multilib      20java                    50ncurses
99gentoolkit-env
05binutils      20java-config             50qtdir3               99libstdc++
05compiler      30java-finalclasspath     60gstreamer-0.10       binutils
05gcc           45emul-linux-x86-qtlibs   60gstreamer-0.8        gcc
05portage.envd  45kdepaths-3.5            60ladspa               java
08nspr          45qt3                     70less
08nss           50emul-linux-x86-gtklibs  75emul-linux-x86-base
lightning etc #

The current contents of locales.build are shown here. Seems fairly
generic but what do I know? ;-)

lightning ~ # cat /etc/locales.build
# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:
# en_US/ISO-8859-1

en_US/ISO-8859-1
en_US.UTF-8/UTF-8
lightning ~ #

I ran locale-gen. No error messages:

lightning ~ # locale-gen
 * You should upgrade your /etc/locales.build to /etc/locale.gen
 * and then remove /etc/locales.build when you're done.

 * Automatically importing locales from /etc/locales.build ...
 * You really should do this yourself ...

 * Generating 2 locales (this might take a while) with 1 jobs
 *  (1/2) Generating en_US.ISO-8859-1 ...                           [ ok ]
 *  (2/2) Generating en_US.UTF-8 ...                                   [ ok ]
 * Generation complete
lightning ~ #

   Unfortunately there is no locale.gen file generated:

lightning etc # ls -la /etc/locale.gen
ls: cannot access /etc/locale.gen: No such file or directory
lightning etc #

lightning etc # updatedb
lightning etc # slocate locale.gen
/usr/share/man/man5/locale.gen.5.gz
lightning etc #

locale-gen seems to read locales.build, I think:

lightning etc # locale-gen -l
en_US.ISO-8859-1
en_US.UTF-8
lightning etc #

   So far it seems like this isn't working for me. I'll wait for some
feedback and keep reading.

Thanks,
Mark

-- 
gentoo-amd64@gentoo.org mailing list



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

* Re: [gentoo-amd64] locales questions
  2006-12-04 19:33   ` Mark Knecht
@ 2006-12-04 20:12     ` Bo Ørsted Andresen
  2006-12-05 20:08       ` Mark Knecht
  0 siblings, 1 reply; 8+ messages in thread
From: Bo Ørsted Andresen @ 2006-12-04 20:12 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

On Monday 04 December 2006 20:33, Mark Knecht wrote:
[SNIP]
>    Reading the localization and quick install guides I've become a bit
> more confused. The localization guide says the LC_* settings are done
> in /etc/env.d/02locale but this doesn't exist here, not even after
> running locale-gen:
[SNIP]

Setting LANG in 02locale is preferred over setting LC_ALL since that allows 
you to override it with LC_ALL on the command line. And no, it isn't 
generated automatically. You must create this file by yourself. After that 
you need to run `env-update && source /etc/profile`.

> The current contents of locales.build are shown here. Seems fairly
> generic but what do I know? ;-)
>
> lightning ~ # cat /etc/locales.build
[SNIP]
> en_US/ISO-8859-1
> en_US.UTF-8/UTF-8
> lightning ~ #

The syntax of locale.gen is more strict than the syntax of locales.build. The 
above is valid for locales.build. In locale.gen it must be:

# cat /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8

You must create that file and remove locales.build manually before running 
locale-gen. locale-gen told you that if you bothered to read it...:

[SNIP]
>  * You should upgrade your /etc/locales.build to /etc/locale.gen
>  * and then remove /etc/locales.build when you're done.
>
>  * Automatically importing locales from /etc/locales.build ...
>  * You really should do this yourself ...
[SNIP]

Finally `locale -a` will show you valid values for LANG and LC_*.

# locale -a
en_US
en_US.utf8

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-amd64] locales questions
  2006-12-04 20:12     ` Bo Ørsted Andresen
@ 2006-12-05 20:08       ` Mark Knecht
  2006-12-05 20:22         ` Bo Ørsted Andresen
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2006-12-05 20:08 UTC (permalink / raw
  To: gentoo-amd64

Bo,
   Hi. I'm sure you're frustrated with me. Sorry. I really am reading
these docs but there seem to be things I'm not quite understanding or
things missing from the docs. Probably it's just me. Sorry.

On 12/4/06, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Monday 04 December 2006 20:33, Mark Knecht wrote:
> [SNIP]
> >    Reading the localization and quick install guides I've become a bit
> > more confused. The localization guide says the LC_* settings are done
> > in /etc/env.d/02locale but this doesn't exist here, not even after
> > running locale-gen:
> [SNIP]
>
> Setting LANG in 02locale is preferred over setting LC_ALL since that allows
> you to override it with LC_ALL on the command line. And no, it isn't
> generated automatically. You must create this file by yourself. After that
> you need to run `env-update && source /etc/profile`.

OK, so I've now created 02locale by hand. However I cannot find a
document that clearly states what an English only speaker/reader who
lives in the U.S. would prefer here. Trying to follow the Eupean
centric example on the web page I now have:

lightning ~ # cat /etc/env.d/02locale
LC_ALL="en"
LANG="en"
lightning ~ #

I hope that's OK. I think the changes took hold:

lightning ~ # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
lightning ~ # env | grep -i LC_
LC_ALL=en
lightning ~ #

I've added

LINGUAS="en"

to my make.conf file as required.

>
> > The current contents of locales.build are shown here. Seems fairly
> > generic but what do I know? ;-)
> >
> > lightning ~ # cat /etc/locales.build
> [SNIP]
> > en_US/ISO-8859-1
> > en_US.UTF-8/UTF-8
> > lightning ~ #
>
> The syntax of locale.gen is more strict than the syntax of locales.build. The
> above is valid for locales.build. In locale.gen it must be:
>
> # cat /etc/locale.gen
> en_US ISO-8859-1
> en_US.UTF-8 UTF-8
>
> You must create that file and remove locales.build manually before running
> locale-gen. locale-gen told you that if you bothered to read it...:

I promise - I read that 10 times. It just doesn't read to me that I
need to do it by hand even though it seems to say so. Sorry!

>
> [SNIP]
> >  * You should upgrade your /etc/locales.build to /etc/locale.gen
> >  * and then remove /etc/locales.build when you're done.
> >
> >  * Automatically importing locales from /etc/locales.build ...
> >  * You really should do this yourself ...
> [SNIP]
>
> Finally `locale -a` will show you valid values for LANG and LC_*.
>
> # locale -a
> en_US
> en_US.utf8

OK, but in my case it's still not working quite right:

lightning etc # cat /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
lightning etc # cat /etc/env.d/02locale
LC_ALL="en"
LANG="en"
lightning etc # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
lightning etc # locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US
en_US.utf8
lightning etc #

So, I think I still have work to do here.

Again, thanks very much for the help and sorry for being so dense about this.

Cheers,
Mark

-- 
gentoo-amd64@gentoo.org mailing list



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

* Re: [gentoo-amd64] locales questions
  2006-12-05 20:08       ` Mark Knecht
@ 2006-12-05 20:22         ` Bo Ørsted Andresen
  2006-12-05 21:27           ` Mark Knecht
  0 siblings, 1 reply; 8+ messages in thread
From: Bo Ørsted Andresen @ 2006-12-05 20:22 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

On Tuesday 05 December 2006 21:08, Mark Knecht wrote:
>    Hi. I'm sure you're frustrated with me. Sorry. I really am reading
> these docs but there seem to be things I'm not quite understanding or
> things missing from the docs. Probably it's just me. Sorry.

Don't worry about it.. ;P

[SNIP]
> lightning etc # locale -a
> locale: Cannot set LC_CTYPE to default locale: No such file or directory
> locale: Cannot set LC_MESSAGES to default locale: No such file or directory
> locale: Cannot set LC_COLLATE to default locale: No such file or directory

I believe those errors means your LANG setting is wrong.

> C
> POSIX
> en_US
> en_US.utf8

It should be one of those 4 settings. And you don't want C or POSIX so either 
LANG="en_US" or LANG="en_US.utf8". If you choose the latter you want to read 
the UTF-8 guide [1]... The former should be ok though.

[1] http://www.gentoo.org/doc/en/utf-8.xml

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-amd64] locales questions
  2006-12-05 20:22         ` Bo Ørsted Andresen
@ 2006-12-05 21:27           ` Mark Knecht
  2006-12-05 21:59             ` Bo Ørsted Andresen
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2006-12-05 21:27 UTC (permalink / raw
  To: gentoo-amd64

On 12/5/06, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Tuesday 05 December 2006 21:08, Mark Knecht wrote:
> >    Hi. I'm sure you're frustrated with me. Sorry. I really am reading
> > these docs but there seem to be things I'm not quite understanding or
> > things missing from the docs. Probably it's just me. Sorry.
>
> Don't worry about it.. ;P

Thanks. You are generous. I am getting closer with your help.

>
> [SNIP]
> > lightning etc # locale -a
> > locale: Cannot set LC_CTYPE to default locale: No such file or directory
> > locale: Cannot set LC_MESSAGES to default locale: No such file or directory
> > locale: Cannot set LC_COLLATE to default locale: No such file or directory
>
> I believe those errors means your LANG setting is wrong.

I got the previous error messages fixed. I had only used 'en' instead
of 'en_US' in 02locale.

However I still have C and POSIX. Where might those be coming from?

lightning etc # locale -a
C
en_US
en_US.utf8
POSIX
lightning etc #

> It should be one of those 4 settings. And you don't want C or POSIX so either
> LANG="en_US" or LANG="en_US.utf8". If you choose the latter you want to read
> the UTF-8 guide [1]... The former should be ok though.
>
> [1] http://www.gentoo.org/doc/en/utf-8.xml

The reason that I *think* I want UTF-8 is that I've had trouble
ripping CDs having certain French and German characters in sing names
then having them be recognized by other programs such as Aqualung.

One other locale question. I've started needing to reboot this machine
into Windows more often so that my son and his freinds can play LAN
games against each other. Is the only thing required to do that is to
set the clock setting to "local"? I set it that way but haven't had
time to do multiple reboots to test it.

Thanks again,
Mark

-- 
gentoo-amd64@gentoo.org mailing list



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

* Re: [gentoo-amd64] locales questions
  2006-12-05 21:27           ` Mark Knecht
@ 2006-12-05 21:59             ` Bo Ørsted Andresen
  0 siblings, 0 replies; 8+ messages in thread
From: Bo Ørsted Andresen @ 2006-12-05 21:59 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On Tuesday 05 December 2006 22:27, Mark Knecht wrote:
> However I still have C and POSIX. Where might those be coming from?

That's fine.

> > It should be one of those 4 settings. And you don't want C or POSIX so
> > either LANG="en_US" or LANG="en_US.utf8". If you choose the latter you
> > want to read the UTF-8 guide [1]... The former should be ok though.
> >
> > [1] http://www.gentoo.org/doc/en/utf-8.xml
>
> The reason that I *think* I want UTF-8 is that I've had trouble
> ripping CDs having certain French and German characters in sing names
> then having them be recognized by other programs such as Aqualung.

So read and follow the UTF-8 guide.

> One other locale question. I've started needing to reboot this machine
> into Windows more often so that my son and his freinds can play LAN
> games against each other. Is the only thing required to do that is to
> set the clock setting to "local"? I set it that way but haven't had
> time to do multiple reboots to test it.

That's not really a locale question. But yes CLOCK="local" should do the job.

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2006-12-05 22:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 18:30 [gentoo-amd64] locales questions Mark Knecht
2006-12-04 18:44 ` Bo Ørsted Andresen
2006-12-04 19:33   ` Mark Knecht
2006-12-04 20:12     ` Bo Ørsted Andresen
2006-12-05 20:08       ` Mark Knecht
2006-12-05 20:22         ` Bo Ørsted Andresen
2006-12-05 21:27           ` Mark Knecht
2006-12-05 21:59             ` Bo Ørsted Andresen

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