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]

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


I'm having difficulty getting the bash shell to handle Japanese double 
byte characters correctly. The handling of double byte Japanese characters 
is improved by adding the definitions listed below, but some commands such 
as ls, find, and cygpath still have problems. Is there anything else I can 
do to improve the handling of Japanese double byte characters in the bash 
shell?  I believe the same problems would occur with Chinese and Korean 
(or any other double byte language for that matter), but would be happy to 
be corrected by someone who knows otherwise.

The details of the problem I'm encountering are given below.

>> Added to .inputrc >>
set kanji-code sjis
set convert-meta off
set meta-flag on
set output-meta on

>> Added to .profile >>
export LANG=ja_JP.SJIS
export TZ=JST-9
export JLESSCHARSET=japanese-sjis
alias ls='ls --show-control-chars --color -F'

>> Added to .vimrc (for vi editor) >>>
set enc=sjis
set fileencoding=sjis

Sample steps to reproduce the problem:
1. Set above variables
2. Open bash
3. Create a directory with Japanese characters
   mkdir '@@@@@'   (@ means Japanese)
4. Change the directory
   cd '@@@@@'

>>> Under Japanese directory, bash can't find files. It seems that the 
Japanese directory can't be handled properly.
$ ls -la
ls: .: No such file or directory

>>> find command can't search under the Japanese directory
$ find . -name test.txt
find: ./@@@@@: No such file or directory

This problem does not occur with all Japanese characters. Problematic 
Japanese characters are Kanji characters which has 0x5c code as the second 
byte in Shift-JIS.

Attached below is the result of executing the command "cygcheck -s -v -r > 
cygversion.txt"



-Joe

Attachment: cygversion.txt
Description: Text document

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]