View previous topic :: View next topic |
Author |
Message |
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 28, 2015 1:24 pm Post subject: GB UTF-8 localisation problems |
|
|
Hi,
this seems to be a recurrent problem and since I'm doing a clean installation, I want it right from the start.
From within the chroot shell:
Code: |
$ locale -a
C
en_GB
en_GB.iso885915
en_GB.utf8
fr_FR
fr_FR.iso885915
fr_FR.utf8
POSIX
|
Code: | $ eselect locale list
Available targets for the LANG variable:
[1] C
[2] en_GB
[3] en_GB.iso885915
[4] en_GB.utf8 *
[5] fr_FR
[6] fr_FR.iso885915
[7] fr_FR.utf8
[8] POSIX
[ ] (free form) |
Code: | $ cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_GB.utf8" |
All looks OK but then when I look at the actual locale settings it only has LANG set correctly , the rest is and old en_GB without UTF8 support. That was the previous locale that I need to replace. Why is all this cruft still there?
Code: |
$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_COLLATE="en_GB"
LC_MONETARY="en_GB"
LC_MESSAGES="en_GB"
LC_PAPER="en_GB"
LC_NAME="en_GB"
LC_ADDRESS="en_GB"
LC_TELEPHONE="en_GB"
LC_MEASUREMENT="en_GB"
LC_IDENTIFICATION="en_GB"
LC_ALL=en_GB
|
Links that I find to the documentation end up being redirected to the wiki, which I have seen at least one thread shown was wrong ( but that's "OK", it's just a user wiki ). Where is the official doc now?
http://www.gentoo.org/doc/en/guide-localization.xml
Quote: | Please explore Wikipedia to read more about locales and related articles. | Wikipedia? LOL !!!
Code: | cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# 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_GB ISO-8859-15
en_GB.UTF-8 UTF-8
#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
fr_FR.UTF-8 UTF-8
#fr_FR ISO-8859-1
fr_FR ISO-8859-15
#it_IT ISO-8859-1
|
Quote: | # Where <locale> is a locale located in /usr/share/i18n/locales/ |
OH yeah?
Code: | ls /usr/share/i18n/locales/
...
en_DK fr_CA kl_GL nr_ZA sv_SE xh_ZA
be_BY@latin en_GB fr_CH km_KH nso_ZA sw_KE yi_US
bem_ZM en_HK fr_FR kn_IN oc_FR sw_TZ yo_NG
ber_DZ en_IE fr_FR@euro kok_IN om_ET szl_PL yue_HK
ber_MA en_IE@euro fr_LU ko_KR om_KE ta_IN zh_CN
bg_BG en_IN fr_LU@euro ks_IN or_IN ta_LK zh_HK
... |
OH, no UTF-8 listings at all ! So these settings are clearly not as documented in the header.
Where do they come from and where are they documented.
Why is it sometime shown as en_GB.UTF-8
Code: | ls /usr/share/i18n/charmaps/
...
DEC-MCS.gz HP-ROMAN9.gz IBM857.gz ISO_6937.gz KOI8-T.gz UTF-8.gz
DIN_66003.gz HP-THAI8.gz IBM860.gz ISO-8859-10.gz KOI8-U.gz VIDEOTEX-SUPPL.gz
DS_2089.gz HP-TURKISH8.gz IBM861.gz ISO-8859-11.gz KSC5636.gz VISCII.gz
EBCDIC-AT-DE-A.gz IBM037.gz IBM862.gz ISO-8859-13.gz LATIN-GREEK-1.gz WINDOWS-31J.gz
....
|
The wiki tells us :
Quote: | Setting the default system locale in /etc/env.d/02locale
LANG="de_DE.UTF-8"
LC_COLLATE="C" |
so now /etc/env.d/02locale takes *.UTF-8 formats, yet when eselect does it is produces lowercase names !?
Having spent several hours trawling gentoo forum posts and googling, I still have not found any definitive documentation nor a consistent explanation of what is needed.
Can anyone help with this mess ?
TIA, Gentree. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Tue Apr 28, 2015 2:57 pm Post subject: Re: GB UTF-8 localisation problems |
|
|
Gentree wrote: | All looks OK but then when I look at the actual locale settings it only has LANG set correctly , the rest is and old en_GB without UTF8 support. That was the previous locale that I need to replace. Why is all this cruft still there?
Code: |
$ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_COLLATE="en_GB"
LC_MONETARY="en_GB"
LC_MESSAGES="en_GB"
LC_PAPER="en_GB"
LC_NAME="en_GB"
LC_ADDRESS="en_GB"
LC_TELEPHONE="en_GB"
LC_MEASUREMENT="en_GB"
LC_IDENTIFICATION="en_GB"
LC_ALL=en_GB
|
| Try locale -a or locale -av and have a look at man locale. |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Tue Apr 28, 2015 3:39 pm Post subject: |
|
|
You're asking the wrong question.
The right question is: why are you setting LC_ALL to en_GB ?
Actually, why are you setting it at all ? |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 28, 2015 3:56 pm Post subject: |
|
|
Indeed.
I don't know when it got set and I have found that that was the problem.
I found a couple of places that said not to set it, but nothing saying that once it was set from a command line it got stored somewhere ( where is anyone's guess ) and over-rides all subsequent changes that all the other configs may or may not make.
I spent several hours screwing around with things that had no visible effect ( other than they did change LANG ) because the effects were masked by LC_ALL, that was presumably set manually during initial installation ( though I don't recall that and don't have it in my installation notes ). Well it only takes once apparently and it stuffs all later changes.
I set LC_ALL="" and the other changes were then effective and I got what I wanted to do.
The question remains, where is the definitive Gentoo doc on this . Are we now supposed to rely on wikipedia ?!
There is also the utf8 vs UTF-8 issue that seems very fuzzy and undefined, plus the comments in the header that were actually wrong.
Since correctly setting the locale is a pretty important requirement, this is very poor.
Thanks for your reply. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 28, 2015 4:01 pm Post subject: |
|
|
Quote: | You're asking the wrong question. |
Actually, no. I asked the right question, since I did not know the answer.
Quote: | That was the previous locale that I need to replace. Why is all this cruft still there?
|
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Tue Apr 28, 2015 5:08 pm Post subject: |
|
|
Gentree wrote: | The question remains, where is the definitive Gentoo doc on this . Are we now supposed to rely on wikipedia ?! |
The Gentoo Localisation Guide and Gentoo UTF-8 Guide are not too bad. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 28, 2015 5:51 pm Post subject: |
|
|
Thanks, they are indeed "not bad".
One of those is the target of the redirection that I noted above. It's a wiki. One of the threads here pointed out it was wrong on some point and was told : well it's a user wiki not official.
Is this now the official developers documentation , or a user wiki all we get ?
Under "What are locales?" we find :
Quote: | Please explore Wikipedia to read more about locales and related articles. |
WTF ? is that the documentation now?
It also contains a warning about LC_ALL:
Quote: | 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. |
That's a load of crap, I over-wrote it earlier and it fixed the problem. That warning was part of the reason that I did not try altering it and wasted so much time looking at everything else. Scared that if I changes it would be permanently set at a probably wrong value.
So again I ask : where is the official Gentoo documentation on how to set up the locale ?
Is that it? A user drive Wiki with crap advice , which then refers me to WonkyPedia if I want to know more?
I hope not.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Tue Apr 28, 2015 6:13 pm Post subject: |
|
|
LC_ALL shouldn't be set at all under normal circumstances - by POSIX specs, it's meant to be master override for locale values.
As for UTF-8/utf8 suffixes they're more or less equivalent - later an alias of the former. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Tue Apr 28, 2015 7:32 pm Post subject: |
|
|
hey, thanks for the alias thing. It makes sense but where is that from? I've not seen any mention of that in all I've seen so far. Again, I ask : where's the doc? _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Wed Apr 29, 2015 6:54 am Post subject: |
|
|
Gentree wrote: |
So again I ask : where is the official Gentoo documentation on how to set up the locale ?
| Some time ago handbook was migrated into wiki.gentoo.org - So the official part you're looking for is in Handbook:ARCH/Installation/Base#Configure_locales, maintained by the documentation team.
But why does eselect offer both versions .utf8 and .UTF-8 Code: | $ eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_US.utf8
[4] en_US.UTF-8 *
[ ] (free form) | And which of them should be selected? Maybe a bug in eselect locale? |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Wed Apr 29, 2015 7:52 am Post subject: |
|
|
Thanks Charles.
So the wiki is now the official doc, including the errors. Great help.
Odd the way you have both UTF-8 and utf8, that seems to go against what VoidImage suggested above. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Wed Apr 29, 2015 9:26 am Post subject: |
|
|
Seems that all LANG="de_DE.UTF-8" in handbook and https://wiki.gentoo.org/wiki/Localization/Guide are wrong as I am only getting the lower case version. Code: | $ cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US.utf8"
LC_COLLATE="C" |
Upper case version seems to be used only in locale-gen Code: | # locale-gen
* Generating 1 locales (this might take a while) with 1 jobs
* (1/1) Generating en_US.UTF-8 ... [ ok ]
* Generation complete |
|
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Wed Apr 29, 2015 9:51 am Post subject: |
|
|
Above I commented on another user saying that page was wrong. He was also german and I think this may be what he pointed to. I did not write it down.
This whole idea of the offical doc being on a wiki sucks big time. It means there is NO official doc. It's a mash of half educated users gems of what they think they know.
This will end up the way as WonkyPedia. Totally unreliable.
_________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 543 Location: Germany
|
Posted: Thu Apr 30, 2015 7:08 am Post subject: |
|
|
Gentree wrote: |
This whole idea of the offical doc being on a wiki sucks big time. It means there is NO official doc. It's a mash of half educated users gems of what they think they know.
|
Please, don't forget that Gentoo and most of other Linux distributions are created by a mash of half educated users. Yes, there are some professionals among them, there are those that are very talented, but in total, it is not a product of corporation, but rather a product of "community". So it is quite natural, that the documentation is also result of community work.
It is quite normal that many things are not polished up. In particular, locales set up might be confusing. For whatever reason, the system adopts 2 namings for UTF-8. One is utf8 and another UTF-8. Any of them can be used. What makes things complicated is ability to set locale at many other places. A user may have $HOME/.profile, $HOME/.bash_profile etc. with "export LC_ALL=xxx" and then global settings won't play any role. User may set locale using eselect, or may directly put it into some script read by shell. Put it in the wrong place, and then different shells will get different setting. Quite obvious, that it is not possible to create documentation that would cover every possible misuse of abilities provided by the system. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Thu Apr 30, 2015 7:18 am Post subject: |
|
|
thanks for your comment.
I was not referring to any "professional" status of devs. My point is that documentation should be written by those who code and implement a system, not by end users.
The UTF-8 vs utf8 thing seems undocumented. I don't see how anyone who has not written the code or spent hours pouring over the source to see how it is done can comment on that in any useful way.
A wiki could be a useful supplement, as are discussions here on the forum but the basic, definitive doc should come from developers, not users. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 543 Location: Germany
|
Posted: Thu Apr 30, 2015 11:54 am Post subject: |
|
|
Gentree wrote: | thanks for your comment.
My point is that documentation should be written by those who code and implement a system, not by end users.
|
I haven't written single line of code for Gentoo, so I'm not in position to judge, what should and what shouldn't do the developers |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Thu Apr 30, 2015 12:04 pm Post subject: |
|
|
Putting aside the issue of documentation per se for a moment, the 'UTF-8' versus 'utf8' issue has always made me wary. I have studiously avoided using 'utf8' or 'utf-8' in any file I create or edit, sticking to the official terminology 'UTF-8' (see Unicode 7.0.0). For example, when I recently installed Gentoo on my new laptop, after seeing that the command 'eselect locale set <n>' resulted in /etc/env.d/02locale containing LANG="en_GB.utf8", I edited the file to make it LANG="en_GB.UTF-8" instead. Interestingly, the result today is as follows (presumably as a consequence of entering 'env-update && source /etc/profile' for the first time after editing /etc/locale.gen and running 'locale-gen' when following the Handbook to install Gentoo):
Code: | fitzcarraldo@clevow230ss ~ $ su
Password:
clevow230ss fitzcarraldo # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_GB
[4] en_GB.iso88591
[5] en_GB.utf8
[6] es_ES
[7] es_ES.iso88591
[8] es_ES.utf8
[9] pt_BR
[10] pt_BR.iso88591
[11] pt_BR.utf8
[12] spanish
[13] en_GB.UTF-8 *
[ ] (free form)
clevow230ss fitzcarraldo # eselect locale set 13
Setting LANG to en_GB.UTF-8 ...
Run ". /etc/profile" to update the variable in your shell.
clevow230ss fitzcarraldo # cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_GB.UTF-8"
LC_COLLATE="C"
clevow230ss fitzcarraldo # |
Anyway, I see that unfortunately Perl, for one, treats 'UTF-8' and 'utf8' differently:
- The Perl UTF-8 and utf8 Encoding Mess
- Know the difference between utf8 and UTF-8
As I wrote above, I personally avoid using 'utf-8' and 'utf8'. The official standard uses 'UTF-8' and in my opinion that is what all the Gentoo documentation -- Wiki or otherwise -- should use throughout. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Thu Apr 30, 2015 3:23 pm Post subject: |
|
|
Fitzcarraldo wrote: |
Code: | fitzcarraldo@clevow230ss ~ $ su
Password:
clevow230ss fitzcarraldo # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_GB
[4] en_GB.iso88591
[5] en_GB.utf8
[6] es_ES
[7] es_ES.iso88591
[8] es_ES.utf8
[9] pt_BR
[10] pt_BR.iso88591
[11] pt_BR.utf8
[12] spanish
[13] en_GB.UTF-8 *
[ ] (free form)
|
|
There you have [5] lower case and [13] upper case. Same situation here and not very clear which one to select - until I played around.
After eselecting the lower case then running locale-gen the upper case version has gone, also in /etc/env.d/02locale.
And the .UTF-8 never came back, not in locale -a, not with "eselect locale list" and not with "cat /etc/env.d/02locale". It's all with .utf8
Guess it's all done in the bash script /usr/sbin/locale-gen (sys-libs/glibc-2.20-r2). |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Thu Apr 30, 2015 3:41 pm Post subject: |
|
|
charles17 wrote: | After eselecting the lower case then running locale-gen the upper case version has gone, also in /etc/env.d/02locale.
And the .UTF-8 never came back, not in locale -a, not with "eselect locale list" and not with "cat /etc/env.d/02locale". It's all with .utf8 |
Just out of curiosity, have you tried editing /etc/env.d/02locale and changing LANG="en_GB.utf8" to LANG="en_GB.UTF-8" then running 'locale-gen' followed by 'eselect locale list'? I'm guessing that you would see the 'UTF-8' again.
Now that you come to mention 'locale -a' ...
Code: | clevow230ss fitzcarraldo # cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# 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_GB ISO-8859-1
en_GB.UTF-8 UTF-8
pt_BR ISO-8859-1
pt_BR.UTF-8 UTF-8
es_ES ISO-8859-1
es_ES.UTF-8 UTF-8
clevow230ss fitzcarraldo # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_GB
[4] en_GB.iso88591
[5] en_GB.utf8
[6] es_ES
[7] es_ES.iso88591
[8] es_ES.utf8
[9] pt_BR
[10] pt_BR.iso88591
[11] pt_BR.utf8
[12] spanish
[13] en_GB.UTF-8 *
[ ] (free form)
clevow230ss fitzcarraldo # locale -a
C
POSIX
en_GB
en_GB.iso88591
en_GB.utf8
es_ES
es_ES.iso88591
es_ES.utf8
pt_BR
pt_BR.iso88591
pt_BR.utf8
spanish |
Must be a bug somewhere in the packages. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri May 01, 2015 11:30 am Post subject: |
|
|
charles17 wrote: | Gentree wrote: |
So again I ask : where is the official Gentoo documentation on how to set up the locale ?
| Some time ago handbook was migrated into wiki.gentoo.org - So the official part you're looking for is in Handbook:ARCH/Installation/Base#Configure_locales, maintained by the documentation team.
But why does eselect offer both versions .utf8 and .UTF-8 Code: | $ eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] en_US.utf8
[4] en_US.UTF-8 *
[ ] (free form) | And which of them should be selected? Maybe a bug in eselect locale? |
Because it list your locales (the ones install) + the one from your 02locale env.
And the one from 02locale is taken as-is without any validity checking.
Code: | cat /etc/env.d/02locale
LANG="Seriously_?_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] Seriously_?_fr_FR.UTF-8 *
[ ] (free form)
|
|
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Sat May 02, 2015 9:37 am Post subject: |
|
|
Fitzcarraldo wrote: |
Must be a bug somewhere in the packages. |
Worth filing a bug? The scripts /usr/sbin/locale-gen and /usr/bin/locale are from sys-libs/glibc. Do you see any impact, not just only confusion, of it? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2038 Location: United Kingdom
|
Posted: Sat May 02, 2015 10:27 am Post subject: |
|
|
Well, I've been using Gentoo for quite a few years now and it's never caused me any trouble, but, as I wrote in my second post, I personally avoid using 'utf-8' and 'utf8' in any file I create or edit; I studiously stick to 'UTF-8'. Perhaps others who mix them have seen an impact; the first post by Gentree would appear to indicate he has a problem. When I installed Gentoo on my new laptop recently I edited the /etc/env.d/02locale created by the 'eselect locale' command and changed 'utf8' to 'UTF-8' and did not experience the result reported by Gentree in his first post. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sat May 02, 2015 11:46 am Post subject: |
|
|
Yeah, but.. glibc defaults to labelling it "utf8". I agree we should just use "UTF-8" everywhere, fwtw.
Anyhow, here's my /etc/locale.gen: Code: | en_GB ISO-8859-1
en_GB.UTF-8 UTF-8 |
which results in:
Code: | $ locale -a
C
POSIX
en_GB
en_GB.iso88591
en_GB.utf8 |
and /etc/env.d/02locale: Code: | LANG=en_GB.UTF-8
LC_COLLATE=C |
|
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3667
|
Posted: Sat May 02, 2015 12:08 pm Post subject: |
|
|
steveL wrote: | and /etc/env.d/02locale: Code: | LANG=en_GB.UTF-8
LC_COLLATE=C |
|
After changing to something different using eselect, are you able to change it back to the present LANG=en_GB.UTF-8, also using eselect? |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sat May 02, 2015 1:00 pm Post subject: |
|
|
I've never used eselect for locale, and I'm not about to now. (That's what ~/.bashrc is for, if a user wants to override.)
Can't recall the URL that helped the most, but there were several in any case; all from #bash on IRC: chat.freenode.net which is where I first learnt how the locale variables work.
If you want to chat to professional sysadmins, and see what they get up to in scripting, that's the place, ime.
Standard C and POSIX locale handling sure made a lot more sense after, for me. |
|
Back to top |
|
|
|