Re: Saving UTF-8 as File
Re: Saving UTF-8 as File
- Subject: Re: Saving UTF-8 as File
- From: Sherm Pendley <email@hidden>
- Date: Tue, 19 Apr 2005 14:39:30 -0400
On Apr 19, 2005, at 1:53 PM, August Trometer wrote: However, when I save to a file (using NSString writeToFile:atomically), it doesn't save as UTF-8 and when the file is read I get all kinds of bogus characters.
Can someone point me in the right direction to be able to save the HTML string as a UTF-8 encoded file?
Use NSString's -dataUsingEncoding: method to create an NSData object, then NSData's -writeToFile:atomically:.
sherm--
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden