On 19 Mar '08, at 10:04 AM, J. Todd Slack wrote:

How do I write an ASCII 254 and ASCII 255 at the beginning of the NSString that I am putting in the file I want to be read back in at a later date? '

Those wouldn't go into the NSString; they're the byte-order-mark that prefixes the UTF-16 data, not part of the character data itself.

I really recommend you write out the string in UTF-8 instead, as I suggested yesterday (with example code). UTF-8 is the most common modern encoding for text, because (a) it's a superset of ascii, and (b) for Roman alphabets it's up to twice as compact as UTF-16.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to