Difference between revisions of "Talk:Locale"

From ArchWiki
Jump to: navigation, search
m (moved Talk:Configuring Locales to Talk:Locale: more generic title)
(setting LC_ALL a bad idea?: new section)
Line 11: Line 11:
 
--[[User:Luetti|Luetti]] 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired.  
 
--[[User:Luetti|Luetti]] 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired.  
 
If this is a common and/or important problem, I will add this to the article. What do you think?
 
If this is a common and/or important problem, I will add this to the article. What do you think?
 +
 +
== setting LC_ALL a bad idea? ==
 +
 +
At the end, this wiki suggests setting LC_ALL in /etc/environment
 +
 +
https://wiki.archlinux.org/index.php/Locale#gnome-terminal_doesn.27t_support_UTF-8_characters_for_me
 +
 +
but the Gentoo localization page says about LC_ALL that you should "never set it in a startup file".
 +
 +
http://www.gentoo.org/doc/en/guide-localization.xml
 +
 +
Who is correct?
 +
 +
Is it sufficient just to set LANG in /etc/environment, and not set LC_ALL?

Revision as of 13:56, 10 January 2011

"invalid charset name"

hello ppl, I was having this error message while trying to access man pages and running less, it turns out that the LESSCHARSET environment variable does not recongnize utf if it is written like 'utf8' it will only work if you write it like 'UTF-8' hope it helps!

.bashrc

.bashrc is only used by interactive bash sessions, right? So that if you login with KDM in KDE (or GDM gnome), the whole KDE session will inherit the locale set by init->KDM and will not use the one set in .bashrc!

I guess a "source ~/.bashrc" in ~/.xprofile would solve this.

--Luetti 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired. If this is a common and/or important problem, I will add this to the article. What do you think?

setting LC_ALL a bad idea?

At the end, this wiki suggests setting LC_ALL in /etc/environment

https://wiki.archlinux.org/index.php/Locale#gnome-terminal_doesn.27t_support_UTF-8_characters_for_me

but the Gentoo localization page says about LC_ALL that you should "never set it in a startup file".

http://www.gentoo.org/doc/en/guide-localization.xml

Who is correct?

Is it sufficient just to set LANG in /etc/environment, and not set LC_ALL?