delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/09/12:50:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_41,J_CHICKENPOX_52,J_CHICKENPOX_63,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Lenik <lenik AT bodz DOT net>
Subject: Re: Cygwin programs doesn't support non-ASCII filenames
Date: Sun, 10 May 2009 00:49:53 +0800
Lines: 59
Message-ID: <gu4c7o$ipl$1@ger.gmane.org>
References: <gu2u4o$f2i$3 AT ger DOT gmane DOT org> <20090509100231 DOT GR21324 AT calimero DOT vinschen DOT de> <gu46gf$3tf$1 AT ger DOT gmane DOT org> <20090509154400 DOT GS21324 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2
In-Reply-To: <20090509154400.GS21324@calimero.vinschen.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

On 2009-5-9 23:44, Corinna Vinschen wrote:
> On May  9 23:12, Lenik wrote:
>> (This mail is encoded in utf-8)
>>
>> On 2009-5-9 18:02, Corinna Vinschen wrote:
>>> [Repeated and additional question.  I accidentally sent this as PM.
>>>    Sorry about that.  Let's keep this on the list, please]
>>>
>>> On May  9 11:43, Lenik wrote:
>>>> (My system locale is zh_CN)
>>> What ANSI codepage is that?
>>>
>>> And what OEM codepage uses the console Window by default?
>> `chcp' shows codepage is 937
>
> 937?!?  Per MSDN there's no 937 codepage, rather a 936 codepage
Sorry, it's 936.

> Ok, but that's not Cygwin's problem, just the d tool would need an
> update at one point, perhaps.  OTOH, what you're doing is a bit
> borderline.  When you start this stuff from cmd, you will have to enter
> the filename in the notation valid for the locale in which the
> application works.  For d, which only works in the C locale, you would
> have to give the pathname using the SO/UTF-8 sequences.  Right now I
> have no idea if there's a workaround for that, but keep in mind that
> we're at the beginning of real native language support.  Unfortunately
> it's all a bit more complicated than on non-Windows systems, given the
> UTF-16-ness of the underlying system.
>
d is an example, there's more. so I guess it should be resolved in 
cygwin maybe better...

Though I maybe able to use UTF-8 sequences to invoke d tool, but I can't 
do anything about cwd, for example:
	bash-3.2$ pwd
	/mnt/c/Profiles/Shecti/桌面

	bash-3.2$ ls
	Gears Shortcut Sample.lnk  hello      setup.xj  worker.js
	e-3.4.lnk                  reply.txt  sms.xls

	bash-3.2$ d
	---------  :  0  Jan 01  1970  桌面


> The default lcoale is "C", as demanded by POSIX.  Everything else is
> in responsibility of the application.  Please read
But set LANG=C will get a different result,

	C:\Profiles\Shecti> set LANG=& bash -c "cat 你好"
	cat: 你好: No such file or directory

	C:\Profiles\Shecti> set LANG=C& bash -c "cat 你好"
	123

So I guess the default locale isn't C.


Lenik


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

- Raw text -


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