In my application server give response text in non English characters. I parse this data and store this in string.
I want string operation on this string but due to non English characters, I got error and crash.
Specially this happen when hindi characters available in response.
Please help me.
开发者_C百科Thanks in advance.
The problem could be with the way your are getting the data from the server and storing it in the NSString. You might be decoding your data with ASCII characterset.
Try with this NSUTF8StringEncoding. This could solve your problem:
NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
精彩评论