views:

481

answers:

1

Hello,

I need to convert NSString in unicode to NSString in ASCII changing all local characters: Ą to A, Ś to S, Ó to O, ü to u, And do on...

What is the simplest way to do it?

+3  A: 

-[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 '?'.

Ken
That is it. Thank you.
Jacek