Last Updated: July 07, 2016
·
11.96K
· brendanobrienesq

Custom Unicode Characters in Objective-C (SymbolSet)

I recently purchased a copy of <a href="http://symbolset.com/">Symbolset</a> from Oak studios, and was excited to use it in our iOS app. after some fiddling, characters can be shown using their unicode values in 8-hex format. The lookup table provides them in html hex entities, so a conversion from:

&#x1F304;

would look like this in any c-based language:

"\U0001F304"

basically, drop the &#x bit, and prepend zeros to pad out to 8 characters, respecting capitalization.

1 Response
Add your response

在swift 1.2 或者 swift 2.1中
\U{00003439}
\U00003439
都无法通过
\u{3439}不报错,但并不能正常显示需要的内容

over 1 year ago ·