Re: NSString looses Umlaute
Re: NSString looses Umlaute
- Subject: Re: NSString looses Umlaute
- From: Mike Abdullah <email@hidden>
- Date: Thu, 22 Dec 2011 13:40:41 +0000
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 (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