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: Martin Wierschin <email@hidden>
- Date: Fri, 16 Nov 2007 19:37:48 -0800
Thanks, using that documentation and setxattr() seems to be working
just fine.
~Martin
On Nov 16, 2007, at 5:21 PM, Ali Ozer wrote:
No, but the format is documented in the Foundation release notes.
Ali
On Nov 16, 2007, at 16:56 , Martin Wierschin wrote:
The best way to save a string to a text file is to use -[NSString
writeToURL:atomically:encoding:error:], or the corresponding
method taking a path. This is even more important on Leopard,
because on Leopard NSString will tag the file with an extended
attribute specifying the encoding, so that it can be opened
properly by TextEdit and anything else using Cocoa APIs to load
text files.
Unfortunately that method doesn't allow for controlling whether
the save can be lossy or not. Is there a way to manually set the
text encoding file attribute after using the NSData method? I
don't see a constant for the atribute in NSFileManager.
_______________________________________________
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