This is the mail archive of the
mailing list for the Cygwin project.
Re: How To Handle Special Characters in Cygwin, E.G., Trademark Symbol, n with the tilde above it
- From: Erwin Waterlander <waterlan at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Oct 2011 19:53:56 +0200
- Subject: Re: How To Handle Special Characters in Cygwin, E.G., Trademark Symbol, n with the tilde above it
- References: <email@example.com>
Op 11-10-2011 17:44, Leon Vanderploeg schreef:
I have recently encountered a problem with accessing files that have special
characters in the file names. The special characters include (a couple
examples) the trademark symbol and the n with a tilde above it. The
recommendation from "
Filenames with unusual (foreign) characters
Windows filesystems use Unicode encoded as UTF-16 to store filename
information. If you don't use the UTF-8 character set (see the section
called "Internationalization") then there's a chance that a filename is
using one or more characters which have no representation in the character
set you're using.
In the default "C" locale, Cygwin creates filenames using the UTF-8
charset. This will always result in some
valid filename by default, but again might impose problems when
switching to a non-"C" or non-"UTF-8" charset.
To avoid this scenario altogether, always use UTF-8 as the character
Suggestions on how to access these files?
What problems do you get? As long as you stick to UTF-8 character
encoding there should be no problems. The language doesn't need to be C.
I use locale nl_NL.UTF-8 without problems. In case your program uses
gettext/libintl set the LANG environment variable explicitly to
something.UTF-8. Otherwise a bug in libintl may cause that your program
doesn't see the UTF-8 locale encoding. Use mintty instead of the default
console for correct display.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple