[Re:] Language vs character settings [Re: How to print textfiles in Cygwin 1.7?]

Thomas Wolff towo@towo.net
Fri Jan 15 10:40:00 GMT 2010


Niklaus Kuehnis wrote:
> ... As UTF-8 is generally the preferred charset, I would like to stick 
> to it. Does changing the language, e.g. to de_CH, change umlaut 
> handling? It doesn't seem to, here.
That depends...
If you just have LANG in your environment to indicate the UTF-8 
character set, or even no environment variable (meaning UTF-8 on cygwin),
and then set LANG=de_CH inside a terminal session, your environment and 
your actual terminal encoding will become inconsistent,
with the consequence that many programs (esp. all "modern" programs 
using the locale mechanism) will apply the wrong assumption about your 
terminal.

That's why my suggestion for a more practical setting is:
export LC_CTYPE=C.UTF-8
to establish a more persistent declaration of your terminal's behaviour.
Then you can simply set LANG as you like to adjust other properties with 
any applications that honour it.

This didn't become the standard scenario, however, due to other 
considerations and compatibility with Linux distributions.
So my suggestion is to include this in your .profile:
export LC_CTYPE=${LANG-C.UTF-8}
to gain flexibility in changing LANG later.

------
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list