Fixing locales: Difference between revisions
No edit summary |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| Line 6: | Line 6: | ||
So, after reading a zillion webpages, I finally punted and just appended to my <code>~/.bashrc</code> file and man pages worked again | So, after reading a zillion webpages, I finally punted and just appended to my <code>~/.bashrc</code> file and man pages worked again | ||
< | <syntaxhighlight lang="bash"> | ||
export LANG="en_US.UTF-8" | export LANG="en_US.UTF-8" | ||
export LC_ALL="en_US.UTF-8" | export LC_ALL="en_US.UTF-8" | ||
export LANGUAGE="en_US.UTF-8" | export LANGUAGE="en_US.UTF-8" | ||
export LC_CTYPE="en_US.UTF-8" | export LC_CTYPE="en_US.UTF-8" | ||
</ | </syntaxhighlight> | ||
I ended up editing <code>/var/lib/locales/supported.d/local</code> | I ended up editing <code>/var/lib/locales/supported.d/local</code> | ||
| Line 27: | Line 27: | ||
then I did a | then I did a | ||
< | <syntaxhighlight lang="bash"> | ||
sudo dpkg-reconfigure locales | sudo dpkg-reconfigure locales | ||
</ | </syntaxhighlight> | ||
which updated my system | which updated my system | ||
| Line 37: | Line 37: | ||
There are a dizzying number of files, programs and settings involved in locale; and worse -- there are differences between distributions on what commands work, how they work; and where the configurations are stored. | There are a dizzying number of files, programs and settings involved in locale; and worse -- there are differences between distributions on what commands work, how they work; and where the configurations are stored. | ||
I suggest that you start off with | I suggest that you start off with | ||
< | <syntaxhighlight lang="bash"> | ||
man:/locale-gen | man:/locale-gen | ||
</ | </syntaxhighlight> | ||
to get an idea of what files are involved in your distribution. | to get an idea of what files are involved in your distribution. | ||
| Line 47: | Line 47: | ||
All the files in <code>/var/lib/belocs</code> | All the files in <code>/var/lib/belocs</code> | ||
will get updated when you run | will get updated when you run | ||
< | <syntaxhighlight lang="bash"> | ||
sudo dpkg-reconfigure locales | sudo dpkg-reconfigure locales | ||
</ | </syntaxhighlight> | ||
== See also == | == See also == | ||
| Line 87: | Line 87: | ||
== Hack == | == Hack == | ||
Setting environment variables prior to launching an application is one way to work around this problem, but obviously does not solve it on a system-wise basis. I used this command in KMenu to get around the fact that the variable ''was'' set system-wide, but didn't get picked up in the application environment: | Setting environment variables prior to launching an application is one way to work around this problem, but obviously does not solve it on a system-wise basis. I used this command in KMenu to get around the fact that the variable ''was'' set system-wide, but didn't get picked up in the application environment: | ||
< | <syntaxhighlight lang="bash"> | ||
env LC_ALL='en_US.UTF-8' && k3b %U | env LC_ALL='en_US.UTF-8' && k3b %U | ||
# or the simpler | # or the simpler | ||
LC_ALL=en_US.UTF-8 k3b %U | LC_ALL=en_US.UTF-8 k3b %U | ||
</ | </syntaxhighlight> | ||
and appended to an existing bug report with the workaround information | and appended to an existing bug report with the workaround information | ||
(note that double quotes do not work in the KMenu environment.) | (note that double quotes do not work in the KMenu environment.) | ||