Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Locale Settings - having trouble changing them
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 758

PostPosted: Mon Jul 14, 2014 2:34 pm    Post subject: Locale Settings - having trouble changing them Reply with quote

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
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4280

PostPosted: Mon Jul 14, 2014 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 758

PostPosted: Tue Jul 15, 2014 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4280

PostPosted: Tue Jul 15, 2014 3:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 758

PostPosted: Wed Jul 16, 2014 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum