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 '?'.
2.1m questions
2.1m answers
60 comments
56.9k users