I have Unicode Hex Character Code 🚂
that I receive from a server request, and I want to convert it to the Steam Locomotive emoji in my UILabel
. I have read many other posts on the issue, but none of the solutions seem to work.
I have read posts about decoding HTML entities or setting the NSString
as a UFT8 string, but none of those work.
NSString *unicode = @"Train 🚂";
self.label.text = [unicode stringByDecodingHTMLEntities]; <---- Doesn't work
Tried this:
NSString *train = @"Train 🚂";
self.label.text = [NSString stringWithUTF8String:[train UTF8String]]; <---- Doesn't work
Any ideas on how to convert this so I can see the emoji in my UILabel
?
Note: This is different from the other questions about unicode characters, as this format has not been addressed and a solution proposed.