How To Handle Special Characters in Cygwin, E.G., Trademark Symbol, n with the tilde above it
Tue Oct 11 17:54:00 GMT 2011
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 "
> http://www.cygwin.com/cygwin-ug-net/using-specialnames.html" is:
> 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
More information about the Cygwin