[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for unicode support on Win32 in GNUstep base
From: |
Adam Fedor |
Subject: |
Re: Patch for unicode support on Win32 in GNUstep base |
Date: |
Wed, 25 Aug 2004 08:10:12 -0600 |
On Aug 25, 2004, at 2:41 AM, Richard Frith-Macdonald wrote:
My feeling is that, if the filesystem names are going to be unicode
(ie contain characters which can't be represented in any one single
byte characterset), the encoding should be utf-8 and so
-fileSystemRepresentation would return a utf-8 sequence, which could
then be converted to 16-bit unicode if/when it is passed to a system
call.
The only problem with that is ... what if people set their default
encoding to be (for instance) latin1, but they try to use filenames
containing characters which can't be represented in that characterset
and need utf-8? I think this could be a problem on any system though,
not just windows.
Yes it is. From the documentation, the methods should return UTF8 on
systems that can handle UTF8 filenames (I think almost everything can).
Right now I think it only does that when the default encoding is some
form of UTF8 (perhaps that's OK, I think?))
On Windows, I had thought about making sure that happens and then doing
the conversion to 16-bit before the system call. That's OK if we are
just using it internally, but it would be confusing for a developer on
Windows using fileSystemRepresentation, expecting it to return a true
16-bit unicode when it really returns utf8