View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Mon Jul 14, 2014 2:34 pm Post subject: Locale Settings - having trouble changing them |
|
|
How can I get all my local settings to go to en_US.utf8? Right now I have them in C.
Code: |
one@localhost ~ $ locale
LANG=en_US.utf8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
one@localhost ~ $ cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US.utf8"
one@localhost ~ $ eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_US.utf8 *
[ ] (free form) |
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Jul 14, 2014 3:55 pm Post subject: |
|
|
http://wiki.gentoo.org/wiki/UTF-8#Finding_or_Creating_UTF-8_Locales
Don't mistake .utf8 and .UTF-8 ; i can't really tell you the diff, but the .UTF-8 style is the way to go and not .utf8 (alas the wiki also doesn't tell you why, but it suggest you really must use .UTF-8 form)
I think .utf8 just doesn't work, but it seems for usa/uk users as it get back to C default. Something foreign language user see clearly.
Code: |
locale -a | grep fr
fr_FR.utf8
locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE=C
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
cat /etc/env.d/02locale
LANG="fr_FR.UTF-8"
LC_COLLATE="C"
eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] fr_FR.utf8
[4] fr_FR.UTF-8 *
[ ] (free form)
|
|
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Tue Jul 15, 2014 2:22 pm Post subject: |
|
|
I uncommented the UTF8 in /etc/locale.gen and did a locale-gen, but got:
Code: | localhost one # locale-gen
/usr/sbin/locale-gen: eval: line 251: unexpected EOF while looking for matching `"'
/usr/sbin/locale-gen: eval: line 252: syntax error: unexpected end of file
* Generating 7 locales (this might take a while) with 1 jobs
* (1/7) Generating en_US.UTF-8
LC_CTYPE="en_US.
LC_NUMERIC="en_US.
LC_TIME="en_US.
LC_COLLATE="en_US.
LC_MONETARY="en_US.
LC_MESSAGES="en_US.
LC_PAPER="en_US.
LC_NAME="en_US.
LC_ADDRESS="en_US.
LC_TELEPHONE="en_US.
LC_MEASUREMENT="en_US.
LC_IDENTIFICATION="en_US.utf8" ... [ ok ]
* (2/7) Generating ...character map file `LC_NUMERIC=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_CTYPE=en_US': No such file or directory
[ !! ]
* (3/7) Generating ...character map file `LC_COLLATE=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_TIME=en_US': No such file or directory
[ !! ]
* (4/7) Generating ...character map file `LC_MESSAGES=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_MONETARY=en_US': No such file or directory
[ !! ]
* (5/7) Generating ...character map file `LC_NAME=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_PAPER=en_US': No such file or directory
[ !! ]
* (6/7) Generating ...character map file `LC_TELEPHONE=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_ADDRESS=en_US': No such file or directory
[ !! ]
* (7/7) Generating ...character map file `LC_IDENTIFICATION=en_US.utf8' not found: No such file or directory
cannot open locale definition file `LC_MEASUREMENT=en_US': No such file or directory
[ !! ]
* Generation complete
localhost one # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_US.utf8 *
[ ] (free form)
localhost one #
|
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Tue Jul 15, 2014 3:10 pm Post subject: |
|
|
cat /etc/locale.gen | grep fr
"fr_FR.UTF-8 UTF-8
locale-gen
/usr/sbin/locale-gen: eval: line 251: unexpected EOF while looking for matching `"'
/usr/sbin/locale-gen: eval: line 252: syntax error: unexpected end of file
/usr/sbin/locale-gen: eval: line 252: unexpected EOF while looking for matching `"'
/usr/sbin/locale-gen: eval: line 253: syntax error: unexpected end of file
* Generating 0 locales (this might take a while) with 1 jobs
* Bad entry in locale.gen: '"fr_FR.UTF-8 UTF-8 '; skipping
* Generation complete
cat /etc/locale.gen | grep fr
fr_FR.UTF-8 UTF-8
locale-gen
* Generating 1 locales (this might take a while) with 1 jobs
* (1/1) Generating fr_FR.UTF-8 ... [ ok ]
* Generation complete
For all the other errors like LC_NUMERIC... I suppose you've gone totally crazy and add them in locale.gen file...
You just need to add only the UTF8 name, no LC_ANYTHING in locale.gen file. |
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Wed Jul 16, 2014 3:20 pm Post subject: |
|
|
Thanks, those errors are gone now.
I have en_US.UTF-8 UTF-8 in my /etc/locale.gen. How come it is not showing up in eselect?
localhost one # !ese
eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_US.utf8 *
[ ] (free form)
localhost one # |
|
Back to top |
|
|
|