iOS 5: How to convert an Emoji to a unicode character?
Please try this :
-
Convert Emoji to unicode
NSData *data = [strEmo dataUsingEncoding:NSNonLossyASCIIStringEncoding]; NSString *goodValue = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-
Very easy to convert unicode to Emoji
NSData *data = [strEmo dataUsingEncoding:NSUTF8StringEncoding]; NSString *goodValue = [[NSString alloc] initWithData:data encoding:NSNonLossyASCIIStringEncoding];
\ue415
is part of the legacy encoding for emoji and is specific to certain Japanese carriers. SoftBank, NTT and docomo all had their own private emoji character sets.
iOS 5 has moved to the newly specified Unicode 6.0 support for emoji character planes and <0001f604>
is the Unicode code point for that character. The wikipedia entry about this references an EmojiSources.txt mapping file that you'll need to use to do the mapping yourself if you really need to get the old private-use character codes.
http://en.wikipedia.org/wiki/Emoji