On 22 Dec 2011, at 09:59, Alexander Reichstadt wrote:

> Thanks, it works. The following solved the problem, where theChoice is a URL 
> to a local file from an NSOpenPanel:
> 
>        NSData *theData = [NSData dataWithContentsOfURL:theChoice];
>        NSString *theContent = [[NSString alloc] initWithData:theData encoding:
>                                
> CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingDOSLatin1)
>                                ];
You can initialise a string directly from the contents of a URL you realise, 
right? Or are you saying that doesn't work, but this technique somehow does?

_______________________________________________

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 arch...@mail-archive.com

Reply via email to