NSString - Unicode to ASCII equivalent
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] . All of the examples you gave are handled as you want. Looks like characters with no obvious analog, such as ☃, go to '?'. NSString *unicode = @"Chào mừng đến với Việt Nam."; NSString *standard = [unicode stringByReplacingOccurrencesOfString:@"đ" withString:@"d"]; standard = [standard stringByReplacingOccurrencesOfString:@"Đ" withString:@"D"]; NSData