public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Help needed getting unicode working in bash
       [not found] <4AA8DAA3.8060508@fmail.co.uk>
@ 2009-09-10 16:45 ` Andy Koppe
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Koppe @ 2009-09-10 16:45 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help needed getting unicode working in bash
  2009-09-09  3:36 Kit Johnson
@ 2009-09-09 19:31 ` Andy Koppe
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Koppe @ 2009-09-09 19:31 UTC (permalink / raw)
  To: cygwin

2009/9/9 Kit Johnson:
> I'm just getting started with cygwin and really enjoying the linux-like
> functionality under windows.  I have one major problem which is displaying
> unicode filenames in bash.
>
> To be specific about my problem, I do not need to type unicode under bash, I
> simply want to be able to list them (using ls) and archive them (using tar).
>  Currently all I get is this:  "ls: cannot access ???????????????? : No such
> file or directory."

You need to set up the LC_CTYPE environment variable. For example, if
you're from the US, you'll probably want to set it to "en_US.UTF-8".
This needs to be set before bash is invoked. There are at least two
ways to do this:

1) Add a line like this to the cygwin.bat script in your Cygwin
install directory:
set LC_CTYPE=en_US.UTF-8

2) Set the variable in the Windows environment, either by going to
Computer->Properties->Advanced->Environment Variables and addiing it
there, or by using the 'setx' command line tool that comes with the
Windows Resource Kit Tools (or preinstalled with some Windows
variants).

The second method is preferable if you want that variable to be set
when starting Cygwin programs without going through cygwin.bat.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Help needed getting unicode working in bash
@ 2009-09-09  3:36 Kit Johnson
  2009-09-09 19:31 ` Andy Koppe
  0 siblings, 1 reply; 3+ messages in thread
From: Kit Johnson @ 2009-09-09  3:36 UTC (permalink / raw)
  To: cygwin

I'm just getting started with cygwin and really enjoying the linux-like 
functionality under windows.  I have one major problem which is 
displaying unicode filenames in bash.
There are two references in the cygwin documentation to getting unicode 
up and running.  Unfortunately the FAQ is incredibly brief and provides 
no usable instructions for a non-expert. 
http://www.cygwin.com/faq/faq-nochunks.html#faq.using.unicode

The documentation page is much more detailed, but having read it many, 
many times, I still have no idea what I actually need to do to get 
things running.  I am not expert enough to understand it.  
http://www.cygwin.com/1.7/cygwin-ug-net/setup-locale.html

To be specific about my problem, I do not need to type unicode under 
bash, I simply want to be able to list them (using ls) and archive them 
(using tar).  Currently all I get is this:  "ls: cannot access 
???????????????? : No such file or directory."
Many thanks.
Kit

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-10 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4AA8DAA3.8060508@fmail.co.uk>
2009-09-10 16:45 ` Help needed getting unicode working in bash Andy Koppe
2009-09-09  3:36 Kit Johnson
2009-09-09 19:31 ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).