Re: Getting TextEdit to Recognise UTF-8 Output
Re: Getting TextEdit to Recognise UTF-8 Output
- Subject: Re: Getting TextEdit to Recognise UTF-8 Output
- From: Gus Mueller <email@hidden>
- Date: Fri, 21 May 2010 12:48:11 -0700
On May 21, 2010, at 12:42 PM, K.Darcy Otto wrote:
> [textStream appendFormat:@"%C%C%C",0x00EF,0x00BB,0x00BF]; // textStream is an empty NSMutableString that gets added to, and then written to a file
How are you writing the string to a file? Are you using NSString's writeToFile:atomically:? I'm pretty sure that doesn't write it out as UTF8. You'll probably want to use writeToFile:atomically:encoding:error: with NSUTF8StringEncoding as the encoding if you aren't already.
-gus
--
August 'Gus' Mueller
Flying Meat Inc.
http://flyingmeat.com/
_______________________________________________
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