Re: Best way to save a simple text file?
Re: Best way to save a simple text file?
- Subject: Re: Best way to save a simple text file?
- From: Ali Ozer <email@hidden>
- Date: Fri, 16 Nov 2007 10:23:10 -0800
This method has the added advantage that under Leopard it will save
the encoding out, making it possible to open the file as plain text
correctly in TextEdit and other apps that use NSString to open files.
Ali
On Nov 16, 2007, at 10:19 , Jean-Nicolas Jolivet wrote:
I've came across this method in the doc...
Could this be used in my NSDocument's writeToUrl method?? (So that
it works with NSDocument's saving/opening/closing etc..)
If so, I think it would, indeed, be a better way!
I. Savant wrote:
However, I was wondering... is it really necessary for me to
convert my
string to an NSData object before saving it? Isn't there any other
way
to do it? Also, what if I would like to support multiple languages
(i.e.
multiple encoding??)... right now the string is converted to UTF8...
How about NSString's -writeToURL:atomically:encoding:error: (10.4
and above only)?
--
I.S.
_______________________________________________
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