This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: SOLVED: Removed 1.5.25 and installed 1.7.0, but still cannot access filenames containing Unicode
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 2 Nov 2009 21:24:49 +0100
- Subject: Re: SOLVED: Removed 1.5.25 and installed 1.7.0, but still cannot access filenames containing Unicode
- References: <4AE65A40.9070405@monai.ca> <20091027091532.GB2076@calimero.vinschen.de> <4AE8A278.5060406@monai.ca> <20091029110030.GN28753@calimero.vinschen.de> <4AE9F26B.4030203@monai.ca> <4AEC9A9F.6080201@monai.ca> <416096c60910311333p3d26f997n1a11e7fdbc6a46a3@mail.gmail.com> <20091102114207.GA7831@calimero.vinschen.de> <416096c60911021116r3f4e1ee4u1787e18214de2b33@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
On Nov 2 19:16, Andy Koppe wrote:
> 2009/11/2 Corinna Vinschen:
> >> >> You must not use characters
> >> >> in this range from U+f000 up to U+f0ff. ?There's no solution to this
> >> >> except for "don't use these characters in filenames if they are not
> >> >> explicitely written there by either Cygwin or Microsoft's SUA".
> >>
> >> Actually there is a possible solution: when translating a U+F0xx
> >> character, first check whether the xx byte really is illegal in the
> >> target charset. If it's not, it won't roundtrip correctly, so encode
> >> the U+F0xx as a ^X sequence instead. Doesn't seem worth the effort
> >> though.
> >
> > I was contemplating this over the weekend. ?I just applied a patch to
> > do this. ?I tested this with various filenames containing all sorts
> > of characters, including f000, which would represent an ASCII NUL, if
> > used wrongly.
>
> I've had a look at the patch. It improves roundtrip transparency for
> Windows filenames at the cost of reduced transparency for POSIX
> filenames.
>
> Single U+F0xx's are now fine, but sequences of them still will not
> necessarily roundtrip correctly, e.g., with a UTF-8 locale:
>
> U+F0C3 U+F084 -> 0xC3 0x84 -> U+00C4 ('Ä')
>
> And U+F0xx's on the POSIX side now won't roundtrip if they get mapped
> to single bytes on the way back, e.g:
>
> 0xEF 0x80 0x8A -> U+F00A -> 0x0A (newline)
> 0xEF 0x81 0xBC -> U+F07C -> 0x7C (pipe)
> 0xEF 0x82 0x80 -> U+F080 -> 0x80 (invalid UTF-8)
Yes, you cannot have everything. Keep in mind that U+F0xx sequences
with xx >= 0x80 are representing invalid multibyte bytes anyway. It's
still not such a great idea to use the characters in this range for
anoher purpose.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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