[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: /etc/environment



On 09-Aug-2000 Wouter Hanegraaff wrote:
> Hi,
> 
> I was having trouble with the display of special characters in mutt when
> logged in using ssh, and I found that the LANG environment variable is
> the culprit.
> 
> When I use mutt from an xterm, special characters like ë, é, § for
> example are displayed correctly. However, after doing ssh localhost from
> that xterm, special characters are displayed as '?'. diff-ing the
> environment settings showed that from a normal xterm, LANG is unset,
> while from a login shell (e.g. when using ssh) LANG is set to C,
> whatever that means. 
> 
> The only place I found LANG=C appeared to be /etc/environment, and
> changing this to LANG='' appears to have solved the problem.
> 
> But several questions remain:
> 
> Why doesn't display of special characters work when LANG is set to a
> value?
> 
> When is /etc/environment parsed? I tried su - and xterm -ls, and LANG is
> not set. But when I login from the console or with ssh or telnet, it is.

It's parsed when you log in (see /etc/pam.d/login)
 
> Why is LANG set to C from /etc/environment; which package puts this in?
> And what does LANG=C mean to programs in general?

LANG=C is put there by the 'locales' package. It is used by 'internationalized'
programs (for more on this read the locale(1,5,7) manpages and the 'Locales and
Internationalization' section in the glibc manual). This interface is defined
by ISO C, so the standard locale is called 'C'.

I've no idea what the cause of your problem is, AFAIK when LANG is unset,
programs should fall back to the default locale, which is 'C'. And on my box
8bit chars are displayed correctly no matter what LANG is set to. 



Reply to: