This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Anyone using bash shell in Japanese, Chinese, or Korean?


Your observation, Igor, is correct.  The 0x5C character is the backslash 
and that is at the root of the problem, especially in a command like ls. 
We haven't run across the problem with 0x2F, but that may just be a matter 
of time.

If Cygwin applications are handling the multibyte characters as a sequence 
of bytes that would certainly be the root of the problem. Moving to 
multibyte-friendly Windows API calls would be a big step forward.  Given 
the large number of Cygwin users in Japan, I'm surprised that hasn't 
already happened.  It must be possible because I've been told that the 
bash shell that comes with the MKS Toolkit can handle Japanese characters 
correctly.

-Joe


FWIW, I think it might be more than a coincidence that 0x5c is the ASCII
code for '\'.  I suspect the same problem will occur for characters with
0x2f ('/') in the second byte (if there are any).

The crux is that a lot of Cygwin applications don't have any handling of
multibyte characters -- they simply process each string as a sequence of
bytes.  The problem appears when the multi-byte representation contains
(accidentally) a character that's being treated specially (e.g., '/' or
'\').  How much of this is due to the program looking at the string
itself, and how much is due to using the wrong type of Windows API calls
(that aren't multibyte-friendly), remains to be seen.  It would be
interesting to strace the "ls ." invocation to see whether it breaks
somewhere inside "ls" or inside a Windows API call.
                 Igor
P.S. We all saw the (identical?) post from two days ago
(<http://cygwin.com/ml/cygwin/2004-05/msg00567.html>), so there was no
need to re-post this.
-- 
                                                                 
http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_ igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'                            Igor 
Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL              a.k.a JaguaR-R-R-r-r-r-.-.-. 
Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]