• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString and file system Re: AppleScript in Sandboxed App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString and file system Re: AppleScript in Sandboxed App


  • Subject: Re: NSString and file system Re: AppleScript in Sandboxed App
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 18 Jan 2013 13:49:21 +0000

On 16 Jan 2013, at 17:40, Quincey Morris <email@hidden> wrote:

> On Jan 16, 2013, at 09:12 , "email@hidden" <email@hidden> wrote:
>
>> To be honest I rarely remember to call -fileSystemRepresentation.
>> The docs seem to indicate that its only purpose is to replace abstract / and . characters with OS equivalents.
>> On OS X this would have seem to have no net result.
>>
>> Is there more to this?
>
> You absolutely have to do it. There may be other things, but the transformations in 'fileSystemRepresentation' include at least:
>
> 1. '/' characters are replaced by ':', for file systems that use '/' as a path component separator. (':' has always been illegal in file names at the UI, so the transformation is reversible.)
>
> 2. Graphemes with multiple Unicode representations are converted to a normal form, for file systems that store Unicode file names. (Can't remember which form -- Unicode normal form D, I think.) That removes indeterminacy when there are accented "characters" (graphemes) with equivalent 1- and 2- character Unicode forms, or "characters" with multiple accents where the order of the accents could vary.

If you ever sample -fileSystemRepresentation, you'll see it just calls through internally to -[NSFileManager fileSystemRepresentationWithPath:], which documents the unicode handling a little better:

> A C-string representation of path that properly encodes Unicode strings for use by the file system.


_______________________________________________

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

References: 
 >AppleScript in Sandboxed App (From: John Nairn <email@hidden>)
 >Re: AppleScript in Sandboxed App (From: Mike Abdullah <email@hidden>)
 >Re: AppleScript in Sandboxed App (From: John Nairn <email@hidden>)
 >Re: AppleScript in Sandboxed App (From: "email@hidden" <email@hidden>)
 >NSString and file system Re: AppleScript in Sandboxed App (From: Fritz Anderson <email@hidden>)
 >Re: NSString and file system Re: AppleScript in Sandboxed App (From: "email@hidden" <email@hidden>)
 >Re: NSString and file system Re: AppleScript in Sandboxed App (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: constructor for 'E' must explicitly initialize the base class 'C' which does not have a default constructor
  • Next by Date: Re: constructor for 'E' must explicitly initialize the base class 'C' which does not have a default constructor
  • Previous by thread: Re: NSString and file system Re: AppleScript in Sandboxed App
  • Next by thread: Re: AppleScript in Sandboxed App
  • Index(es):
    • Date
    • Thread