我有当前的代码,它似乎确实有效,除了 CFShow 没有将\u00e9的 unicode UTF8 编码转换为 é
#include <CoreFoundation/CoreFoundation.h>
int main()
{
char *s = "This is a test of unicode support: fiancée\n";
CFTypeRef cfs = CFStringCreateWithCString(NULL, s, kCFStringEncodingUTF8);
CFShow(cfs);
}
输出是
This is a test of unicode support: fianc\u00e9e
|____|
> é doesn't output properly.
我如何指示 CFShow 它是 unicode?当它是交流字符串时,printf 可以很好地处理它。