【发布时间】:2012-04-12 05:41:03
【问题描述】:
我正在尝试使用 CGContextShowTextAtPoint 绘制一个字符串。 CGContextShowTextAtPoint 只接受“const char”作为字符串输入。 我的问题是某些字符串中包含特殊字符,例如 ä,ö,ü 等。
如果我将此字符串转换为“const char”
NSString *label = @"Küche";
const char *charLabel = [label UTF8String];
我得到一个奇怪的输出,其中 ü 被符号和框替换...
怎么办?
【问题讨论】:
标签: ios nsstring char nsstringencoding