问题
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