Mohan Build 22.5.03

Jeff Sturm jsturm@one-point.com
Tue May 27 20:04:00 GMT 2003


On Tue, 27 May 2003, [ISO-8859-1] João Garcia wrote:
> The only way I can find to reproduce the problem is to put a file in the
> working directory (you are not accessing the root directory -- you would
> have to use c:\\ for that...) with a file name which includes a
> character with a code above 127 (joão.txt will do the trick).

Wow, great job figuring that out!

> Theoretically I love UTF-8! But it is almost useless with Win32 file
> systems for char codes above 127. :(

UTF-8 seems plainly wrong in this context.  Surely GetFileAttributes()
etc. don't expect UTF-8, but a localized string.

It's been a while since I've looked at Win32.  From what I remember, the
Unicode functions (e.g. GetFileAttributesW) expect a UCS-2 string, so
perhaps you could call those with a (jchar *) and let the platform do the
conversion?

> I am willing to post it on the patches mailing list (I was already
> planing to do so). But there is no warranty that it will be accepted...

I'd like to see the patch.

Jeff



More information about the Java mailing list