获得NSLocaleIdentifier的特殊字符?人物

时间:2013-02-16 11:58:07

标签: iphone ios xcode cocoa

首先,这是我的代码:

- (NSString *)getNameFromCountryCode:(NSString *)countryCodeTwoLetters{
NSString *identifier = [NSLocale localeIdentifierFromComponents:[NSDictionary dictionaryWithObject:countryCodeTwoLetters forKey:NSLocaleCountryCode]];
NSString *name = [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:identifier];
NSLog(@"string:%s", [name UTF8String]);
return name;
}

它正在工作,除了某些语言中有“é”我看到“?”代替。 使用UTF8String的日志没有任何变化,仍然是“?”而不是“é”。

我该如何解决这个问题? 感谢

0 个答案:

没有答案
相关问题