I recently had problems with a new-installed Trac that complains about:
LookupError: unknown encoding: utf_8_euro
This problem occurs when using a locale such as it_IT.UTF-8@euro, due to a wrong use of the python function:
locale.getdefaultlocale()[1]
that fails with such locales. While the recommended way to fix that is to use the locale.getpreferredencoding() function instead, a way to fix it is to set the environment variables defining the locale to something safer, such as en_US.UTF-8, or just it_IT.UTF-8.
To set the default locale on Gentoo, just edit the /etc/profile.env file:
Old version:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
export LANG='en_US.UTF-8' export LC_ADDRESS='it_IT.UTF-8@euro' export LC_COLLATE='it_IT.UTF-8@euro' export LC_CTYPE='it_IT.UTF-8@euro' export LC_IDENTIFICATION='it_IT.UTF-8@euro' export LC_MEASUREMENT='it_IT.UTF-8@euro' export LC_MESSAGES='en_US.UTF-8' export LC_MONETARY='it_IT.UTF-8@euro' export LC_NAME='it_IT.UTF-8@euro' export LC_NUMERIC='it_IT.UTF-8@euro' export LC_PAPER='it_IT.UTF-8@euro' export LC_TELEPHONE='it_IT.UTF-8@euro' export LC_TIME='it_IT.UTF-8@euro' |
New version:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
export LC_ADDRESS='en_US.UTF-8' export LC_COLLATE='en_US.UTF-8' export LC_CTYPE='en_US.UTF-8' export LC_IDENTIFICATION='en_US.UTF-8' export LC_MEASUREMENT='en_US.UTF-8' export LC_MESSAGES='en_US.UTF-8' export LC_MONETARY='en_US.UTF-8' export LC_NAME='en_US.UTF-8' export LC_NUMERIC='en_US.UTF-8' export LC_PAPER='en_US.UTF-8' export LC_TELEPHONE='en_US.UTF-8' export LC_TIME='en_US.UTF-8' export LC_ALL='en_US.UTF-8' |
Then, you could overwrite these settings using per-user .bash_profile.
Another way could be using per-host environment settings in the apache config (UNTESTED):
1 2 3 4 |
SetEnv LANG en_US.UTF-8 SetEnv LC_TIME en_US.UTF-8 SetEnv LC_ALL en_US.UTF-8 ... |
There is also a similar debian bug: http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thre...
spunk eva
hovel road eg mask direct auto insurance fyi tanks
hens
aches chic scrip vicky auto bestelle viagra pound motif puns lasix wv myopia stark