Turning NSData to NSString is failing
Posted
by Ricky D'Amelio
on Stack Overflow
See other posts from Stack Overflow
or by Ricky D'Amelio
Published on 2010-03-16T11:06:42Z
Indexed on
2010/03/16
12:56 UTC
Read the original article
Hit count: 509
Hi there.
I have an NSData object which I am trying to turn into an NSString using the following line of code:
NSString *theData = [[NSString alloc] initWithData:photo encoding:NSASCIIStringEncoding];
Unfortunately I am getting the following result, instead of my desired binary output (can I expect a binary output here?);
ÿØÿà
I'd appreciate any help.
Thanks. Ricky.
© Stack Overflow or respective owner