[_EnglishName setString:addressPerson.name];
if (CFStringTransform((__bridge CFMutableStringRef)_EnglishName, 0, kCFStringTransformMandarinLatin, NO)) {
NSLog(@"Pingying: %@", _EnglishName); // wǒ shì zhōng guó rén
}
if (CFStringTransform((__bridge CFMutableStringRef)_EnglishName, 0, kCFStringTransformStripDiacritics, NO)) {
NSLog(@"Pingying: %@", _EnglishName); // wo shi zhong guo ren
}
中文变英文字母(ios)
时间: 2024-11-06 01:17:29