This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]