I have a situation, I don't know what causing it.
I have got a string from server like this
I am trying to decode it using the following code..
NSData *utfStringData=[inputString dataUsingEncoding:NSUTF8StringEncoding];
NSString *output=[[NSString alloc] initWithData:utfStringData encoding:NSNonLossyASCIIStringEncoding];
I get nil as output.
But when I remove extra "\" from the input string, NSString itself shows the proper wording without even passing into decodeString function, see below
So I decided the replace the extra "\" from input string using following code
inputString=[inputString stringByReplacingOccurrencesOfString:@"\\\\" withString:@"\\"];
Above code doesn't work either.
My question is -> What am I doing wrong? How does it work?
Thanks for Helping.