Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I notice LC_COLLATE="C" missing from my locale during instal
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Wed Jul 05, 2017 5:48 am    Post subject: I notice LC_COLLATE="C" missing from my locale dur Reply with quote

I'm trying to do a reasonably straight forward "by the book" install and notice that when I got through the locale and timezone configurations section when I did the:
Code:
(chroot) livecd / # cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US.utf8"


I notice that compared to the one cited in the handbook I have no:

Code:
LC_COLLATE="C"


per the example 02locale

Code:
LANG="de_DE.UTF-8"
LC_COLLATE="C"


Do I need to attend to this or just let it go?
will
_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Jul 05, 2017 6:16 am    Post subject: Re: I notice LC_COLLATE="C" missing from my locale Reply with quote

stardotstar wrote:
I notice that compared to the one cited in the handbook I have no:

Code:
LC_COLLATE="C"


per the example 02locale

Code:
LANG="de_DE.UTF-8"
LC_COLLATE="C"

Is this before doing eselect locale set x or after?
Are you having LC_COLLATE=C in your output of $ locale?

All you need is in https://wiki.gentoo.org/wiki/UTF-8#Setting_up_UTF-8_in_Gentoo.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Wed Jul 05, 2017 7:52 am    Post subject: Reply with quote

This is after I ran through the locale steps in the installer.

Code:
(chroot) livecd /lib/modules # locale -a
C
en_US
en_US.iso88591
en_US.utf8
POSIX
(chroot) livecd /lib/modules #


I have read the Wiki article on UTF-8 thank you for that. I understand its intent and application.

I am reporting results *after* I did all the steps in the handbook from
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Timezone

My locale.gen configuration has only the US English unmasked -
Code:
(chroot) livecd /lib/modules # cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system.
# See the locale.gen(5) man page for more details.
#
# The format of each line:
# <locale name> <charset>
#
# Where <locale name> starts with a name as found in /usr/share/i18n/locales/.
# It must be unique in the file as it is used as the key to locale variables.
# For non-default encodings, the <charset> is typically appended.
#
# Where <charset> is a charset located in /usr/share/i18n/charmaps/ (sans any
# suffix like ".gz").
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.

en_US ISO-8859-1
en_US.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#es_MX ISO-8859-1
#fa_IR UTF-8
#fr_FR ISO-8859-1
#fr_FR@euro ISO-8859-15
#it_IT ISO-8859-1


eselect locale list shows that my English UTF8 is selected:
Code:
(chroot) livecd /lib/modules # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   en_US
  [3]   en_US.iso88591
  [4]   en_US.utf8 *
  [5]   POSIX
  [ ]   (free form)

and I can see "C" there but I never selected it.

At that point in the install process I selected the set for en_US.utf8 - though I'm not sure if I should have chosen straight en_US and what about C and POSIX?

Incidentally the timezone for my local system is Australia/Sydney - (ie there is no en_AU as such) so as I understand it US English will be the best option for Locale.

Any further guidance for me on this please?
_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Jul 05, 2017 8:08 am    Post subject: Reply with quote

The commented section of /etc/locale.gen mentions /usr/share/i18n/locales/
So you could check:
Code:
 ls -al  /usr/share/i18n/locales/ | grep en_AU

or
Code:
grep AU  /usr/share/i18n/SUPPORTED


P.S.:
Regarding the LC_COLLATE, I am always getting it:
eselect locale set 3:
Setting LANG to en_US.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
and
cat /etc/env.d/02locale:
# Configuration file for eselect
# This file has been automatically generated.
LC_COLLATE="C"
LANG="en_US.utf8"
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Wed Jul 05, 2017 8:31 am    Post subject: Reply with quote

OK, yes I see that does indeed point me to Australian locale. Thank you.

I see now that I should have read the localisation guide once I saw that Au English wasn't in the list presented per the handbook.

Reading https://wiki.gentoo.org/wiki/Localization/Guide I have been able to set AU as my default locale but I still am missing the line that is shown in the handbook 02locale

Here are my steps:
Code:

(chroot) livecd /mnt/mint/etc # grep AU /usr/share/i18n/SUPPORTED >> /etc/locale.gen

(chroot) livecd /mnt/mint/etc # cat /etc/locale.gen
...
en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_AU.UTF-8 UTF-8
en_AU ISO-8859-1

(chroot) livecd /mnt/mint/etc # locale-gen
 
* Generating locale-archive: forcing # of jobs to 1
 * Generating 4 locales (this might take a while) with 1 jobs
 *  (1/4) Generating en_AU.ISO-8859-1 ...                                                                                                   [ ok ]
 *  (2/4) Generating en_AU.UTF-8 ...                                                                                                        [ ok ]
 *  (3/4) Generating en_US.ISO-8859-1 ...                                                                                                   [ ok ]
 *  (4/4) Generating en_US.UTF-8 ...                                                                                                        [ ok ]
 * Generation complete

(chroot) livecd /mnt/mint/etc # locale -a

C
en_AU
en_AU.iso88591
en_AU.utf8
en_US
en_US.iso88591
en_US.utf8
POSIX

(chroot) livecd /mnt/mint/etc # eselect locale list

Available targets for the LANG variable:
  [1]   C
  [2]   en_AU
  [3]   en_AU.iso88591
  [4]   en_AU.utf8
  [5]   en_US
  [6]   en_US.iso88591
  [7]   en_US.utf8 *
  [8]   POSIX
  [ ]   (free form)

(chroot) livecd /mnt/mint/etc # eselect locale set 2

Setting LANG to en_AU ...
Run ". /etc/profile" to update the variable in your shell.

(chroot) livecd /mnt/mint/etc # cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_AU"


Consequently I am still confused about the LC_COLLATE="C" that is shown in these wiki pages but does not get written to my 02locale file - do I add it manually?

I am guessing it is important:
Quote:
LC_COLLATE Define alphabetical ordering of strings. This affects e.g. output of sorted directory listings.


and why would I choose en_AU rather than en_AU as opposed to en_AU.iso88591, en_AU.utf8, or C as the *set* I choose?

I updated my environment too btw and it didn't change anything.
_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Jul 05, 2017 8:47 am    Post subject: Reply with quote

stardotstar wrote:
Consequently I am still confused about the LC_COLLATE="C" that is shown in these wiki pages but does not get written to my 02locale file - do I add it manually?
Good question. I am always getting it automatically (sys-libs/glibc-2.23-r).
Edit:
Sorry, I was wrong. If I delete /etc/env.d/02locale and rerun the eselect, that line is missing here too. So you might add it manually.
And please leave an appropriate comment on the handbook's talk page.

stardotstar wrote:
I am guessing it is important:
Quote:
LC_COLLATE Define alphabetical ordering of strings. This affects e.g. output of sorted directory listings.


and why would I choose en_AU rather than en_AU as opposed to en_AU.iso88591, en_AU.utf8, or C as the *set* I choose?

Without UTF-8 you might lose support for non-ASCII characters.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Wed Jul 05, 2017 9:00 am    Post subject: Reply with quote

OK Mr Charles, I'll switch to UTF-8 and add the Collation (and put a comment on the handbook discussion page) Thanks for your assistance - very much appreciated
Will
Code:

livecd /boot # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   en_AU *
  [3]   en_AU.iso88591
  [4]   en_AU.utf8
  [5]   en_US
  [6]   en_US.iso88591
  [7]   en_US.utf8
  [8]   POSIX
  [ ]   (free form)
livecd /boot # eselect locale set 4
Setting LANG to en_AU.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
livecd /boot # . /etc/profile
livecd /boot # cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_AU.utf8"
LC_COLLATE="C"

_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Jul 05, 2017 9:09 am    Post subject: Reply with quote

stardotstar wrote:
OK Mr Charles, I'll switch to UTF-8 and add the Collation (and put a comment on the handbook discussion page) Thanks for your assistance - very much appreciated

The wiki articles Localization/Guide and UTF-8 would appreciate the experience from your fresh install as well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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