wrb3pw
Last Updated: July 07, 2016
·
10.4K
· brendanobrienesq
94340edf1d4bdc2c69c633481e1938f4

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.

Say Thanks
Respond

1 Response
Add your response

24643
None

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

over 1 year ago ·