[1.7] Proposal: the filename encoding in C locale uses UTF-8 instead of SO/UTF-8

Corinna Vinschen corinna-cygwin@cygwin.com
Sun May 17 11:24:00 GMT 2009

On May 17 11:09, IWAMURO Motonori wrote:
> 2009/5/17 Lenik <lenik@bodz.net>:
> > Thanks, but where can I get this patch?
> You can checkout it from CVS HEAD.

It occured to me that, if you're using a charset which differs from your
current ANSI or OEM codepage, you might run into trouble with native
Windows tools.  Therefore I also added a new -C/--codepage option to
cygpath to specify the codepage used to create a WIndows path from a
Cygwin path.  For instance:

  cygpath -C ANSI -aw .

creates the full path of the CWD in the current ANSI codepage.  The
-C/--codepage option takes the following parameters:

- ANSI   to specify the current ANSI codepage (for interaction with GUI tools).

- OEM    to specify the current OEM codepage (for interaction with CLI tools).

- UTF8   just guess...

- n      A decimal codepage number according to the following table:
         Note that not all installations support all codepages.

I hope that helps.  Please note that the -C option doesn't work yet for
the -p option.  That's something I'll do after my vacation.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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/

More information about the Cygwin mailing list