UILabel displaying Unicode Characters

泄露秘密 提交于 2020-01-04 01:44:31

问题


I have an NSString that then sets a UILabel. This contains unicode such as...

E = MC Hammer\U00ac\U2264

and complete ones such as

\U2013\U00ee\U2013\U00e6\U2013\U2202\U2013\U220f\U2013\U03c0 \U2013\U00ee\U2013\U220f\U2013\U03c0\U2013\U00aa\U2013\U221e\U2014\U00c5

These are not displaying correctly, is there anything I need to do to parse these at all?


回答1:


"U" needs to be a lowercase "u"




回答2:


What code are you using to set the NSString? It's possible that the string is not being initialized properly, and that's having a negative impact on the UILabel.



来源:https://stackoverflow.com/questions/1329554/uilabel-displaying-unicode-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!