我需要在我的UI中显示EURO(€,$,£)符号。 这些符号存储在带有\ uXXXX表示的SQLite数据库中。 我如何创建NSString表示?
以下是代码示例:
NSString *currency = [[OptionDAO sharedInstance] readStringOption:@"TEST"
strName:@"currency"
strGroup:@"NONE"]; // currency now contains "\u34AC" for instance.
答案 0 :(得分:0)
NSString *aString = [NSString stringWithUTF8String:"To be continued\u2026"];
答案 1 :(得分:0)
我找到了解决方案。 `NSString * currency = [[OptionDAO sharedInstance] readStringOption:[ctrlParent selectedCompany] .SupplierID 则strName:@ “货币” strGroup:@ “NONE”];
NSData *ccc = [currency dataUsingEncoding:NSUTF8StringEncoding];
currency = [currency length] != 0 ? [NSString stringWithUTF8String:[ccc bytes]] : @"$";`