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: Help needed getting unicode working in bash


2009/9/10 Kit Johnson:
> Thanks so much for taking the time to help. ÂThis is the first time I've
> used a mailing list so I hope I've replied correctly.

Yep, except you replied to me instead of the list. ;)


> I understand charactersets and locales better now. ÂI followed your
> recommendations plus those of the cygwin FAQ and internationalistation
> pages.
>
> However I still get
> "ls: cannot access ?????????.xls: no such file or directory"
> instead of Thai characters when I type 'ls' in bash.
> I've researched the ISO 639-1 and ISO 3166 codes for my location, and would
> like to use UTF-8.
>
> Here are the contents of my cygwin.bat file:
> @echo off
>
> C:
> chdir C:\cygwin\bin
> set LC_CTYPE=th_TH.UTF-8
> bash --login -i

Hmm, that should do the job.

Are you running the Cygwin 1.7 beta? 1.5 doesn't support locales.
('uname -r' will tell you.)


> in my .bashrc file:
> export LANG="th_TH.UTF-8"

You could set LANG instead of LC_CTYPE in cygwin.bat.

The difference is that setting LANG affects all locale-specific
behaviours, e.g. it will enable Thai user interfaces and messages in
programs that have translations for it.

LC_CTYPE only sets the encoding and a couple of other things regarding
character processing. If LANG is set, you don't need LC_CTYPE.


> export OUTPUT_CHARSET="UTF-8"

I don't know whether anything actually uses this. You'd probably be
fine without it.

Andy

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


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