delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/09/03:57:50

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Mon, 9 Nov 2009 16:57:40 +0800
Message-ID: <f4d6f44b0911090057t691a9123kbab910f48da84c3@mail.gmail.com>
Subject: ls and cd command don't use the same encoding
From: Huang Bambo <bambo DOT huang AT gmail DOT com>
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
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

Under 1.7.0-63,64
With mintty
export LANG=3Den_US.UTF-8
export LC_TYPE=3Dzh_CN.UTF-8

ls can list some directory in Chinese but cd command can't enter it.
If I set encoding to GBK, mintty works fine but ssh can't do so then.

$ cd /tmp
[Bambo AT revenco-bambo /tmp]
$ ls
=E4=B8=AD=E6=96=87
[Bambo AT revenco-bambo /tmp]
$ cd =E2=96=92=E2=96=92=E2=96=92=E2=96=92/                                 =
                 (I use tab
key to auto fill this line)
[Bambo AT revenco-bambo /tmp/=E2=96=92=E2=96=92=E2=96=92=E2=96=92]
$ cd ..
[Bambo AT revenco-bambo /tmp]
$ cd =E4=B8=AD=E6=96=87                                                    =
 (I input
the directory name, but can't enter)
-bash: cd: =E4=B8=AD=E6=96=87: No such file or directory

[Bambo AT revenco-bambo /tmp]
$ env | grep LAN
NLS_LANG=3DAMERICAN_AMERICA.ZHS32GB18030
LANG=3Den_US.UTF-8
[Bambo AT revenco-bambo /tmp]
$ env | grep LC
LC_TYPE=3Dzh_CN.UTF-8
[Bambo AT revenco-bambo /tmp]

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