On May 1, 2008, at 10:43 AM, stephen joseph butler wrote:

On Thu, May 1, 2008 at 12:03 PM, Matt Long <[EMAIL PROTECTED] long.com>
wrote:

Stephen Butler pointed out that I need to use -[NSString
fileSystemRepresentation]. I have switched to this and it works. I not real familiar with this call, but it looks like it's working. I'll look into why
this is the better choice. I'm just not familiar.


For almost all intents and purposes, it returns UTF-8, because that's what the APIs to HFS+, et al expect. However, it's conceivable that some file system might want path strings in another (legacy) format. Say, Shift_JIS,
Big5, or KOI8-R.

I'm not sure any do. I'm not even sure the vfs layer allows the fs to
register a preference. But there's a function for it, so you might as well
use it.

It's not that this varies from one file system to another on the same machine, but rather that the BSD/Posix layer of APIs have a specific representation for file system names, and this method insulates you from the details of that representation.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to