I need to convert NSString in unicode to NSString in ASCII changing all local characters: ? to A, ? to S, ó to O, ü to u, And so on...
What is the simplest way to do it?
-[NSString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES].
-[NSString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]
All of the examples you gave are handled as you want. Looks like characters with no obvious analog, such as ?, go to '?'.
1.4m articles
1.4m replys
5 comments
57.0k users