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:
🌄
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.
Written by Brendan O'Brien
Related protips
1 Response
在swift 1.2 或者 swift 2.1中
\U{00003439}
\U00003439
都无法通过
\u{3439}不报错,但并不能正常显示需要的内容
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Unicode
Authors
hermanschaaf
63.23K
lukemadhanga
13.88K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#