[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: Roland Schwingel
Subject: Re: Patch for unicode support on Win32 in GNUstep base
Date: Wed, 04 Aug 2004 13:14:49 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007


Alexander Malmberg wrote:
> The current methods for converting paths to/from the fs representation
> are supposed to convert to whatever the system wants, so if the wide
> character strings are what the system wants, that's what they should
> convert to/from (and if this breaks other methods that assume that the
> fs representation can be used as a c string, those methods should be
> fixed).
> Adding a second set of methods for a specific system seems wrong, and
> goes against the entire purpose of hiding the conversions behind a
> single, cross-platform interface. Why not fix the first set?

I think you are talking about fileSystemRepresentationWithPath: and

Well... The reason for adding the additional 'w' method for
fileSystemRepresentationWithPath: is that fileSystemRepresentationWithPath:
is defined to return const char* in the OpenStep spec. If your path contains
unicode chars you cannot convert them to const char*. You need to convert
them to const unichar* to be later on able to work with it.

Having just one method (fileSystemRepresentationWithPath:)would mean to
change it to return either const unichar* instead of const char* or
NSString. Both would break the OpenStep spec and compatibililty.

So we introduced (yet only internally used in GNUstep base and only for windows) wFileSystemRepresentation: to be able to handle paths containing unicode characters
on windows.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]