* [gentoo-user] setting locale
@ 2011-05-30 1:26 Allan Gottlieb
2011-05-30 2:07 ` Nils Larsson
0 siblings, 1 reply; 15+ messages in thread
From: Allan Gottlieb @ 2011-05-30 1:26 UTC (permalink / raw
To: gentoo-user
On one of my machines all the LC_ variables are "POSIX".
I want them to be "en_US.utf8" as on my other machines.
I have the done the following (from the handbook)
1. cat /etc/local.gen (ignoring comments)
en_US ISO-8859-1
en_US.UTF-8 UTF-8
2. locale-gen
3. source /etc/profile
4. locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
and others as well
LC_All=
What must I do to get "en_US_utf8" ?
thanks,
allan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 1:26 Allan Gottlieb
@ 2011-05-30 2:07 ` Nils Larsson
2011-05-30 14:14 ` Allan Gottlieb
0 siblings, 1 reply; 15+ messages in thread
From: Nils Larsson @ 2011-05-30 2:07 UTC (permalink / raw
To: gentoo-user
måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
> What must I do to get "en_US_utf8" ?
echo "LANG=en_US_utf8" > /etc/env.d/02locale
and
env-update
should work.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 2:07 ` Nils Larsson
@ 2011-05-30 14:14 ` Allan Gottlieb
0 siblings, 0 replies; 15+ messages in thread
From: Allan Gottlieb @ 2011-05-30 14:14 UTC (permalink / raw
To: gentoo-user
On Sun, May 29 2011, Nils Larsson wrote:
> måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
>> What must I do to get "en_US_utf8" ?
>
> echo "LANG=en_US_utf8" > /etc/env.d/02locale
> and
> env-update
> should work.
Thanks. It just needed
source /etc/profile
at the end. The variables are now correct but there are still problems.
1. locale complains
oldlap ~ # locale
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_ALL to default locale: No such file or directory
LANG=en_US_utf8
LC_CTYPE="en_US_utf8"
LC_NUMERIC="en_US_utf8"
LC_TIME="en_US_utf8"
LC_COLLATE="en_US_utf8"
LC_MONETARY="en_US_utf8"
LC_MESSAGES="en_US_utf8"
LC_PAPER="en_US_utf8"
LC_NAME="en_US_utf8"
LC_ADDRESS="en_US_utf8"
LC_TELEPHONE="en_US_utf8"
LC_MEASUREMENT="en_US_utf8"
LC_IDENTIFICATION="en_US_utf8"
LC_ALL=
oldlap ~ #
2. ca-certificates complains during emerge
2A.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US_utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
>>> cfg-update-1.8.2-r1: Creating checksum index...
that was expected from above
2B.
* This package installs one or more file names containing characters that
* do not match your current locale settings. The current setting for
* filesystem encoding is 'ANSI_X3.4-1968'.
*
* usr/share/ca-certificates/mozilla/AC_Ra\ufffd\ufffdz_Certic\ufffd\ufffdmara_S.A..crt
plus other certificates. Perhaps fixing 2A would fix this as well??
2C. The following has unreadable characters
Updating certificates in /etc/ssl/certs... W: /usr/share/ca-certificates/mozilla/AC_Ra��z_Certic��mara_S.A..crt not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sa��lay��c��s��.crt not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/mozilla/NetLock_Arany_=Class_Gold=_F��tan��s��tv��ny.crt not found, but listed in /etc/ca-certificates.conf.
W: /usr/share/ca-certificates/mozilla/T��B��TAK_UEKAE_K��k_Sertifika_Hizmet_Sa��lay��c��s��_-_S��r��m_3.crt not found, but listed in /etc/ca-certificates.conf.
0 added, 0 removed; done.
thanks again,
allan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
[not found] ` <gY0ff-3Pz-1@gated-at.bofh.it>
@ 2011-05-30 14:43 ` David W Noon
2011-05-30 15:55 ` Neil Bothwick
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: David W Noon @ 2011-05-30 14:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
On Mon, 30 May 2011 04:20:01 +0200, Nils Larsson wrote about Re:
[gentoo-user] setting locale:
>måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
>> What must I do to get "en_US_utf8" ?
>
>echo "LANG=en_US_utf8" > /etc/env.d/02locale
>and
>env-update
>should work.
Not likely. The correct locale string is "en_US.UTF-8", not the mess
that is written above.
Moreover, I never use file redirection from echo when a text editor is
a more appropriate tool. What you have suggested above could well
replace a valid locale setting with an that invalid one, without any
checks at all on the existing contents of the file. So, it's best to
use vim, nano or even emacs for such a job.
--
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 14:43 ` [gentoo-user] setting locale David W Noon
@ 2011-05-30 15:55 ` Neil Bothwick
2011-05-30 17:40 ` Florian Philipp
2011-05-31 0:58 ` Allan Gottlieb
2 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2011-05-30 15:55 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Mon, 30 May 2011 15:43:19 +0100, David W Noon wrote:
> Moreover, I never use file redirection from echo when a text editor is
> a more appropriate tool. What you have suggested above could well
> replace a valid locale setting with an that invalid one, without any
> checks at all on the existing contents of the file. So, it's best to
> use vim, nano or even emacs for such a job.
Setting noclobber in /etc/profile.d/*shopts.sh avoids that particular
problem, as well was the one of accidentally nuking a file when you meant
to add to it with >>.
--
Neil Bothwick
Microbiology: staph only.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 14:43 ` [gentoo-user] setting locale David W Noon
2011-05-30 15:55 ` Neil Bothwick
@ 2011-05-30 17:40 ` Florian Philipp
2011-05-30 18:23 ` Dale
2011-05-31 0:58 ` Allan Gottlieb
2 siblings, 1 reply; 15+ messages in thread
From: Florian Philipp @ 2011-05-30 17:40 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
Am 30.05.2011 16:43, schrieb David W Noon:
> On Mon, 30 May 2011 04:20:01 +0200, Nils Larsson wrote about Re:
> [gentoo-user] setting locale:
>
>> måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
>>> What must I do to get "en_US_utf8" ?
>>
>> echo "LANG=en_US_utf8" > /etc/env.d/02locale
>> and
>> env-update
>> should work.
>
> Not likely. The correct locale string is "en_US.UTF-8", not the mess
> that is written above.
>
Please stay polite. It also saves you the effort of writing those words. ;)
> Moreover, I never use file redirection from echo when a text editor is
> a more appropriate tool. What you have suggested above could well
> replace a valid locale setting with an that invalid one, without any
> checks at all on the existing contents of the file. So, it's best to
> use vim, nano or even emacs for such a job.
Sure thing. However, it is much faster to type `echo foo > bar` than
writing "Open your favorite file editor and enter 'foo' into 'bar'."
Being concise is often the better approach when you want to show a
solution to the problem at hand instead of educating the reader.
Everyone who is able to install Gentoo should be able to understand the
shell line and use whatever approach he wants to achieve the same result
and if he is satisfied with the given line, he has a copy-and-paste
solution at hand (my colleagues call this "service to the reader").
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
[not found] ` <gYd2O-i6-3@gated-at.bofh.it>
@ 2011-05-30 17:46 ` David W Noon
2011-05-30 19:03 ` Neil Bothwick
2011-05-30 20:34 ` Nils Larsson
0 siblings, 2 replies; 15+ messages in thread
From: David W Noon @ 2011-05-30 17:46 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On Mon, 30 May 2011 18:00:02 +0200, Neil Bothwick wrote about Re:
[gentoo-user] setting locale:
>On Mon, 30 May 2011 15:43:19 +0100, David W Noon wrote:
>
>> Moreover, I never use file redirection from echo when a text editor
>> is a more appropriate tool. What you have suggested above could well
>> replace a valid locale setting with an that invalid one, without any
>> checks at all on the existing contents of the file. So, it's best to
>> use vim, nano or even emacs for such a job.
>
>Setting noclobber in /etc/profile.d/*shopts.sh avoids that particular
>problem, as well was the one of accidentally nuking a file when you
>meant to add to it with >>.
Setting noclobber is fine for not obliterating the current contents of
the file, but it does not help where the current contents need to be
updated. That is why I *always* use a text editor to modify
configuration files.
--
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 17:40 ` Florian Philipp
@ 2011-05-30 18:23 ` Dale
0 siblings, 0 replies; 15+ messages in thread
From: Dale @ 2011-05-30 18:23 UTC (permalink / raw
To: gentoo-user
Florian Philipp wrote:
>
> Sure thing. However, it is much faster to type `echo foo> bar` than
> writing "Open your favorite file editor and enter 'foo' into 'bar'."
> Being concise is often the better approach when you want to show a
> solution to the problem at hand instead of educating the reader.
>
> Everyone who is able to install Gentoo should be able to understand the
> shell line and use whatever approach he wants to achieve the same result
> and if he is satisfied with the given line, he has a copy-and-paste
> solution at hand (my colleagues call this "service to the reader").
>
> Regards,
> Florian Philipp
>
>
Yep, one could write to open a file with nano or vi. If the user knows
what he/she is doing, opening it with kwrite would work just as good,
unless the GUI is broken. I often get help from folks who say to edit a
file one way but I may do something with a different tool than they
use. Prime example being vi compared to nano. Does the same thing but
a different tool. It's a matter of preferences is all. I use nano but
if someone writes to use vi, I know how to change the command to work
with nano.
The biggest thing is, if a problem can't be solved on this list, it's a
BIG problem or a nifty new feature. lol
Dale
:-) :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 17:46 ` David W Noon
@ 2011-05-30 19:03 ` Neil Bothwick
2011-05-30 20:34 ` Nils Larsson
1 sibling, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2011-05-30 19:03 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 622 bytes --]
On Mon, 30 May 2011 18:46:47 +0100, David W Noon wrote:
> >Setting noclobber in /etc/profile.d/*shopts.sh avoids that particular
> >problem, as well was the one of accidentally nuking a file when you
> >meant to add to it with >>.
>
> Setting noclobber is fine for not obliterating the current contents of
> the file, but it does not help where the current contents need to be
> updated. That is why I *always* use a text editor to modify
> configuration files.
True, sed is a good choice for that.
--
Neil Bothwick
EASY TO INSTALL = Difficult to install, but instruction manual has
pictures.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 17:46 ` David W Noon
2011-05-30 19:03 ` Neil Bothwick
@ 2011-05-30 20:34 ` Nils Larsson
2011-05-31 11:19 ` David Relson
1 sibling, 1 reply; 15+ messages in thread
From: Nils Larsson @ 2011-05-30 20:34 UTC (permalink / raw
To: gentoo-user
Eh... Right, so ...
The echo example might have been a bit blunt. I've found myself using echo
examples as a general "you need to add this setting here" device, like you
learn to do when you start using Gentoo, might have been a bit presumptuous of
me.
As for the incorrect locale string, copy&paste from parent.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 14:43 ` [gentoo-user] setting locale David W Noon
2011-05-30 15:55 ` Neil Bothwick
2011-05-30 17:40 ` Florian Philipp
@ 2011-05-31 0:58 ` Allan Gottlieb
2011-05-31 2:11 ` daid kahl
2 siblings, 1 reply; 15+ messages in thread
From: Allan Gottlieb @ 2011-05-31 0:58 UTC (permalink / raw
To: gentoo-user
On Mon, May 30 2011, David W. Noon wrote:
> On Mon, 30 May 2011 04:20:01 +0200, Nils Larsson wrote about Re:
> [gentoo-user] setting locale:
>
>>måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
>>> What must I do to get "en_US_utf8" ?
>>
>>echo "LANG=en_US_utf8" > /etc/env.d/02locale
>>and
>>env-update
>>should work.
>
> The correct locale string is "en_US.UTF-8".
Thank you this fixed the problem.
allan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-31 0:58 ` Allan Gottlieb
@ 2011-05-31 2:11 ` daid kahl
0 siblings, 0 replies; 15+ messages in thread
From: daid kahl @ 2011-05-31 2:11 UTC (permalink / raw
To: gentoo-user
On 30 May 2011 20:58, Allan Gottlieb <gottlieb@nyu.edu> wrote:
> On Mon, May 30 2011, David W. Noon wrote:
>
>> On Mon, 30 May 2011 04:20:01 +0200, Nils Larsson wrote about Re:
>> [gentoo-user] setting locale:
>>
>>>måndagen den 30 maj 2011 03:26:49 skrev Allan Gottlieb:
>>>> What must I do to get "en_US_utf8" ?
>>>
>>>echo "LANG=en_US_utf8" > /etc/env.d/02locale
>>>and
>>>env-update
>>>should work.
>>
>> The correct locale string is "en_US.UTF-8".
>
> Thank you this fixed the problem.
> allan
>
Indeed, my own notes are exactly the same as here.
As far as the other debates on how to most concisely express the idea,
my notes to myself read as the result rather than say "how to edit
config files". Spill the contents to the screen and you need to see
that (or similar for different locale than US).
daid@flux ~ % cat /etc/env.d/02locale
LANG="en_US.UTF-8"
Is there any kind of project using even a simple GUI like zenity for
doing config file editing in Gentoo? I could use some good way to
organize that stuff some days.
Cheers,
daid
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-30 20:34 ` Nils Larsson
@ 2011-05-31 11:19 ` David Relson
2011-05-31 15:44 ` William Hubbs
0 siblings, 1 reply; 15+ messages in thread
From: David Relson @ 2011-05-31 11:19 UTC (permalink / raw
To: gentoo-user
On Mon, 30 May 2011 22:34:46 +0200
Nils Larsson wrote:
> Eh... Right, so ...
>
> The echo example might have been a bit blunt. I've found myself using
> echo examples as a general "you need to add this setting here"
> device, like you learn to do when you start using Gentoo, might have
> been a bit presumptuous of me.
>
> As for the incorrect locale string, copy&paste from parent.
>
Why not use "echo >> ..." ??
Since the ">>" does an append, the original file contents are still
available for reference.
Since the added line is at the end of the file, the new value will be
used instead of the old value.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-31 11:19 ` David Relson
@ 2011-05-31 15:44 ` William Hubbs
2011-05-31 20:31 ` Mick
0 siblings, 1 reply; 15+ messages in thread
From: William Hubbs @ 2011-05-31 15:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Tue, May 31, 2011 at 07:19:16AM -0400, David Relson wrote:
> Why not use "echo >> ..." ??
>
> Since the ">>" does an append, the original file contents are still
> available for reference.
>
> Since the added line is at the end of the file, the new value will be
> used instead of the old value.
In this case though, to set the locale properly, you should set LANG or
LC_CTYPE and not set any of the other LC_* variables. If you are setting
the other variables, those settings should be removed.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] setting locale
2011-05-31 15:44 ` William Hubbs
@ 2011-05-31 20:31 ` Mick
0 siblings, 0 replies; 15+ messages in thread
From: Mick @ 2011-05-31 20:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 664 bytes --]
On Tuesday 31 May 2011 16:44:25 William Hubbs wrote:
> On Tue, May 31, 2011 at 07:19:16AM -0400, David Relson wrote:
> > Why not use "echo >> ..." ??
> >
> > Since the ">>" does an append, the original file contents are still
> > available for reference.
> >
> > Since the added line is at the end of the file, the new value will be
> > used instead of the old value.
>
> In this case though, to set the locale properly, you should set LANG or
> LC_CTYPE and not set any of the other LC_* variables. If you are setting
> the other variables, those settings should be removed.
Unless you want some of them to be different?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-05-31 20:32 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <gXZCx-2Bo-7@gated-at.bofh.it>
[not found] ` <gY0ff-3Pz-1@gated-at.bofh.it>
2011-05-30 14:43 ` [gentoo-user] setting locale David W Noon
2011-05-30 15:55 ` Neil Bothwick
2011-05-30 17:40 ` Florian Philipp
2011-05-30 18:23 ` Dale
2011-05-31 0:58 ` Allan Gottlieb
2011-05-31 2:11 ` daid kahl
[not found] <gYbX5-6Uj-55@gated-at.bofh.it>
[not found] ` <gYbX5-6Uj-57@gated-at.bofh.it>
[not found] ` <gYbX5-6Uj-53@gated-at.bofh.it>
[not found] ` <gYd2O-i6-3@gated-at.bofh.it>
2011-05-30 17:46 ` David W Noon
2011-05-30 19:03 ` Neil Bothwick
2011-05-30 20:34 ` Nils Larsson
2011-05-31 11:19 ` David Relson
2011-05-31 15:44 ` William Hubbs
2011-05-31 20:31 ` Mick
2011-05-30 1:26 Allan Gottlieb
2011-05-30 2:07 ` Nils Larsson
2011-05-30 14:14 ` Allan Gottlieb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox