in my project i want to convert NSString value to NSdata without encoding, i.e i am using
NSData* aData = [[NSData alloc] initWithData:[[self getStringValue] dataUsingEncoding:NSUTF8StringEncoding]];
when i am using this the string value is encoded but i want the same string value without encoding, How can i get this
Thank You
You will always need to choose an encoding of some type. I always recommend NSUTF8StringEncoding. But if you only need the raw character bytes stored and not UTF8 encoding, these are your best options.