Re: Converting between NSData and NSString losslessly
Re: Converting between NSData and NSString losslessly
- Subject: Re: Converting between NSData and NSString losslessly
- From: Dustin Voss <email@hidden>
- Date: Sun, 24 Jul 2005 12:07:33 -0700
On 24 Jul 2005, at 12:30 AM, email@hidden wrote:
Actually, having investigated further, I've found that
NSMacOSRomanStringEncoding seems to be lossless both ways. That's
sort of solved the problem, from a practical point of view, but I
still wonder whether it's the best approach... I'd rather use
UTF-8, although I guess for the moment MacOS Roman should be
sufficient. I also wonder whether this is in any way defined
behaviour, that I can rely on?
I wouldn't. How I would handle your situation, is pull parts of your
NSData that you know to be ASCII, and use those parts to tell if
other parts are binary or ASCII, then, if necessary, pull out the
content and convert.
_______________________________________________
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