应用需要处理有关用户的生成密码。
密码有时会包含ä
,但是创建CFDictionaryRef时,框架就将字符串转换为\U00e4
了。
const void *keys[] = { somObj};
const void *values[] = { (CFStringRef)[passwords objectAtIndex:i] };
CFDictionaryRef optionsDictionary = CFDictionaryCreate(NULL, keys, values, 1, NULL, NULL);
能不能在目录中将\U00e4
换为ä
?
不太可能,\U00e4
是ä
在 UTF-16的表现格式。在UTF-8中是0xC3 0xA4
,在UTF-32是0x000000E4
。