Re: Finder Info
Re: Finder Info
- Subject: Re: Finder Info
- From: Sean McBride <email@hidden>
- Date: Mon, 27 Aug 2012 12:50:43 -0400
- Organization: Rogue Research Inc.
On Sat, 25 Aug 2012 17:58:39 +0200, Uli Kusterer said:
>>> const UInt8 *cpath = (const UInt8 *)[path
>cStringUsingEncoding:NSUTF8StringEncoding];
>>
>> -UTF8String is shorter.
>
> Both of these are wrong, though. You should *always* use -
>fileSystemRepresentation when you need a C-string representation of a
>path. Otherwise you might get decomposed characters that don't match the
>actual way the characters are stored on disk, and will create a second
>file with an almost-indistinguishable name.
Could you provide an example filename where UTF8String and fileSystemRepresentation give something different? I'd like to run it through QA...
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden