delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/08/09:00:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Wed, 8 Sep 2004 08:59:48 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Colin JN Breame <colinb AT chameleonnet DOT co DOT uk>
cc: cygwin AT cygwin DOT com
Subject: Re: filesystem encoding
In-Reply-To: <413EF019.100@chameleonnet.co.uk>
Message-ID: <Pine.GSO.4.61.0409080851520.4979@slinky.cs.nyu.edu>
References: <413EF019 DOT 100 AT chameleonnet DOT co DOT uk>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Wed, 8 Sep 2004, Colin JN Breame wrote:

> Hello,
> Could anyone direct me to some documentation about how cygwin decodes
> filenames (e.g. with ls)

Cygwin is not Unicode-aware (<http://cygwin.com/acronyms/#PTC>).
Basically, it uses the Win32 API methods that make the underlying
filesystem map from Unicode names to an 8-bit charset (set by your
"Regional Settings").  Any names that can't be so mapped are rejected as
invalid, and are displayed with '?'s by "ls".  Switching to the correct
language allows accessing those names.  See MSDN for more info.

Sometimes, the terminal treats some characters in the charset as control
characters, and doesn't display them proprely.  Programs need to be told
not to do anything special with them, e.g., I have the following aliases:

alias ls='ls -F --color=tty --show-control-chars'
alias less='less -SR'

(note the "--show-control-chars" option to "ls" and the "-R" option to
"less").

> ps. cygwin is cool

Yes, it is.  And getting cooler every day. :-D
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019