[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #4598] filesystemRepresentation on Win32 is DANGEROUS as impl
Re: [patch #4598] filesystemRepresentation on Win32 is DANGEROUS as implemented
Sat, 05 Nov 2005 09:28:23 +0800
Mozilla Thunderbird 1.0.6 (Windows/20050716)
Jeremy Bettis wrote:
Summary: filesystemRepresentation on Win32 is DANGEROUS as
Submitted by: jeremybettis
Submitted on: Fri 11/04/05 at 21:01
Priority: 9 - Immediate
Assigned to: None
*) filesystemRepresentation is declared as returning char* when it actually
*) Even gnustep-base itself has uses of filesystemRepresentation that are not
*) Unicode is NOT the native filesystem encoding for the Win32 API. Win32
actually has 2 "native" encodings.
This patch resolves all of these issues.
new method -unicodeFilesystemRepresentation
fixed all win32 uses of filesystemRepresentation to use the new
fixed all of the occurances of a unicode string being passed to a ANSI api
I agree that fileSystemRepresentation as it currently is in HEAD is dangerous.
However, I think this is the wrong solution.
fileSystemRepresentation should return char* so it can be passed on to *nix/C
routines. That is what it was designed for.
We don't need to use it for unicode. It's symptomatic of the the current
situation where Win32 unicode work is incomplete. We should fix the problems
where they really lie rather than try to mask them with an additional method.
The difficulty here has arisen because of the path munging on Win32 which is
really unnecessary and causes more problems than it's worth. We shouldn't need
fileSystemRepresentation to convert from an internal format.