delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/14/08:19:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <26777598.post@talk.nabble.com>
Date: Mon, 14 Dec 2009 05:19:24 -0800 (PST)
From: =?UTF-8?Q?LiuYan_=E5=88=98=E7=A0=94?= <lovetide AT 21cn DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 1.7: Empty/white-space output when display Chinese characters in GBK charset encoding?
In-Reply-To: <20091214123509.GI8059@calimero.vinschen.de>
MIME-Version: 1.0
References: <26774467 DOT post AT talk DOT nabble DOT com> <20091214105915 DOT GF8059 AT calimero DOT vinschen DOT de> <26776766 DOT post AT talk DOT nabble DOT com> <20091214123509 DOT GI8059 AT calimero DOT vinschen DOT de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

The only unexpected thing is the empty output of GBK-encoded chinese
characters when LANG is xxxx.UTF-8.

I mean it should display something visible(malformed characters, squares or
whatever visible characters) regardless the LANG setting.

echo -e "Chinese characters in GBK encoding: [\xba\xba\xd7\xd6]  -- Output
will be [    ] in Cygwin 1.7"
echo -e "Chinese characters in UTF-8 encoding: [\xe6\xb1\x89\xe5\xad\x97]"

Cygwin windows is a DOS prompt window, and this window has a code page, it's
code page 936(GBK) in Simplified Chinese Windows OS. But Cygwin 1.7 is
*simulating* UTF-8 environment, will this difference cause the empty output
issue?


Corinna Vinschen-2 wrote:
> 
> On Dec 14 04:07, LiuYan ?????? wrote:
>> 
>> Hi Corinna:
>>   I didn't set LANG environment variable, and the result of 'export'
>> command
>> is:
>> ...
>> declare -x LANG="C.UTF-8"
>> ...
>> 
>>   And, if I change LANG to zh_CN.GBK, the cc-gbk.txt file can be
>> displayed
>> correctly (act same behaviour like Cygwin 1.5).
> 
> So everything's as expected.  Good to know.
> 
> 
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
> 
> --
> 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
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Cygwin-1.7%3A-Empty-white-space-output-when-display-Chinese-characters-in-GBK-charset-encoding--tp26774467p26777598.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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