Re: Unicode filename and FSPathMakeRef
Re: Unicode filename and FSPathMakeRef
- Subject: Re: Unicode filename and FSPathMakeRef
- From: Norbert Heger <email@hidden>
- Date: Thu, 03 Jan 2002 19:09:21 +0100
Douglas Davidson <email@hidden> wrote:
>
Nevertheless, there is a difference, both conceptual and practical.
>
First, -fileSystemRepresentation should return a string in the encoding
>
appropriate for filesystems on the current platform, whatever that may
>
be, instead of a hard-coded UTF-8. The encoding for Mac OS X is
>
unlikely to change, but fileSystemRepresentation is still the right
>
thing to use just from this standpoint. Second, the appropriate
>
representation for filesystem paths on Mac OS X is actually specified as
>
(I believe) canonically decomposed UTF-8, which is what
>
fileSystemRepresentation returns, as opposed to simply converting the
>
Unicode string as given into UTF-8. You might well test with thousands
>
of different paths without encountering a case where these differ, but
>
it is possible.
Thanks for clarification!
However, if we are not supposed to use "hard-coded UTF-8", what's the proper
way to convert a fileSystemRepresentation back to an NSString? It seems we
need some kind of -[NSString stringWithFileSystemRepresentation:] method...
Best Regards, Norbert
_____________________________________________
Norbert Heger, Objective Development
http://www.obdev.at/