X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,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 Subject: Cygwin programs doesn't support non-ASCII filenames Date: Sat, 09 May 2009 11:43:20 +0800 Lines: 85 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note-from-DJ: This may be spam (My system locale is zh_CN) 1, test path >>> set LANG=& cygpath -am . C:/Profiles/Shecti/桌面 >>> set LANG=zh_CN.GBK& cygpath -am . C:/Profiles/Shecti/桌面 >>> set LANG=C& cygpath -am . C:/Profiles/Shecti/×ÀÃæ 2, the `test' utility >>> set LANG=& bash -c "D=$(cygpath -am .); if [ -d $D ]; then echo ok $D; else echo fail $D; fi" fail C:/Profiles/Shecti/桌面 >>> set LANG=zh_CN.GB2312& bash -c "D=$(cygpath -am .); if [ -d $D ]; then echo ok $D; else echo fail $D; fi" fail C:/Profiles/Shecti/桌面 >>> set LANG=zh_CN.GBK& bash -c "D=$(cygpath -am .); if [ -d $D ]; then echo ok $D; else echo fail $D; fi" ok C:/Profiles/Shecti/桌面 >>> set LANG=C& bash -c "D=$(cygpath -am .); if [ -d $D ]; then echo ok $D;else echo fail $D; fi" fail C:/Profiles/Shecti/×ÀÃæ 3, the `cp' utility >>> set LANG=& bash -c "F=$(cygpath -am .)/a.zip; if cp -f $F xyz; then echo ok $D; else echo fail $D; fi" cp: cannot stat `C:/Profiles/Shecti/桌面/a.zip': No such file or directory fail >>> set LANG=zh_CN.GB2312& bash -c "F=$(cygpath -am .)/a.zip; if cp -f $F xyz; then echo ok $D; else echo fail $D; fi" cp: cannot stat `C:/Profiles/Shecti/桌面/a.zip': No such file or directory fail >>> set LANG=zh_CN.GBK& bash -c "F=$(cygpath -am .)/a.zip; if cp -f $F xyz; then echo ok $D; else echo fail $D; fi" ok >>> set LANG=C& bash -c "F=$(cygpath -am .)/a.zip; if cp -f $F xyz; then echo ok $D; else echo fail $D; fi" cp: cannot stat `C:/Profiles/Shecti/×ÀÃæ/a.zip': No such file or directory fail 4, the `d' utility >>> set LANG=& bash -c "D=$(cygpath -am .); if d $D; then echo ok $D; else echo fail $D; fi" /mnt/c/Profiles/Shecti/▒桌▒面/C:/Profiles/Shecti/桌面 doesn't exist! fail C:/Profiles/Shecti/桌面 >>> set LANG=zh_CN.GB2312& bash -c "D=$(cygpath -am .); if d $D; then echo ok $D; else echo fail $D; fi" /mnt/c/Profiles/Shecti/▒桌▒面/C:/Profiles/Shecti/桌面 doesn't exist! fail C:/Profiles/Shecti/桌面 >>> set LANG=zh_CN.GBK& bash -c "D=$(cygpath -am .); if d $D; then echo ok $D; else echo fail $D; fi" /mnt/c/Profiles/Shecti/▒桌▒面/C:/Profiles/Shecti/桌面 doesn't exist! fail C:/Profiles/Shecti/桌面 >>> set LANG=C& bash -c "D=$(cygpath -am .); if d $D; then echo ok $D; elseecho fail $D; fi" /mnt/c/Profiles/Shecti/▒桌▒面/C:/Profiles/Shecti/×ÀÃæ doesn't exist! fail C:/Profiles/Shecti/×ÀÃæ Problems: (1) Executables `test', `cp' (and rm, cat, stat, find, etc. seems like all of binutils) supports locale settings, while `d' (and gcc, zip, unzip, gzip, gunzip, jar, vi, etc. not of binutils) are not. (2) Even programs of binutils may not support locale settings correctly, The GB2312 charset is a subset of GBK charset, and the characters ` 桌面' is included in GB2312 charset. So in this example, GB2312 SHOULD WORK. -- 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/