delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/05:34:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4B50449B.9020506@towo.net>
Date: Fri, 15 Jan 2010 11:34:03 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: [Re:] Language vs character settings [Re: How to print textfiles in Cygwin 1.7?]
References: <20100112145927 DOT 264380 AT gmx DOT net> <20100112151039 DOT GA25477 AT calimero DOT vinschen DOT de> <4B503EB4 DOT 1000605 AT gmx-topmail DOT de>
In-Reply-To: <4B503EB4.1000605@gmx-topmail.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019