Re: What encoding to use to turn NSData from a subprocess into an NSString?
Re: What encoding to use to turn NSData from a subprocess into an NSString?
- Subject: Re: What encoding to use to turn NSData from a subprocess into an NSString?
- From: Gerben Wierda <email@hidden>
- Date: Wed, 24 May 2006 07:56:30 +0200
On 24 May 2006, at 07:41, j o a r wrote:
On 24 maj 2006, at 07.33, Gerben Wierda wrote:
Another way to phrase the question is: if I use initWithData:data
encoding:NSUTF8Encoding is it possible that I get nil as the
result if the NSData object contains random data?
Yes, I believe so.
In that case, if I want to turn the data I get from unspecifed
subprocesses into an as-readable-as-possible NSString (the data is
ascii with possible 8bit characters), what is the best choice for
encoding on MacOSX? MacRoman?
What happens with 8bit characters when one uses NSASCIIEncoding?
I do not really mind that the encoding is lossy, but I do not want
nil and I want as redable as possible results.
G
_______________________________________________
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