开发者

iPhone - Chinese text as codepoints rather than characters

This post describes basics of loading Chinese in iPhone apps. However, while I have no difficulty inserti开发者_如何学JAVAng characters encoded as characters, I have not figured out how to use codepoints alone. Any suggestions?

For instance, if I insert 狗不理包 into a label, it displays correctly, but if I insert the equivalent string 狗不理包 , all I get is the 32 ASCII characters. What do I need to do to make codepoints display as Chinese?

EDIT: to show codepoint-string as such, not as characters.


Use this :

 NSString *s = [NSString stringWithUTF8String:"狗不理包"];

I hope it helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜