0

I want to print Unicode character in objective C like NSString s="\ue415". http://www.easyapns.com/iphone-emoji-alerts Now I have the code e415, how can I append this code with \u to print the Emotion, I try to append but I only can get the NSString \ue415 not the unicode character.

jszumski
  • 7,430
  • 11
  • 40
  • 53
realloxer
  • 59
  • 4

1 Answers1

2

The Xcode and clang toolchain allow the use of UTF-8 encoded source files since a while. So just enter the emoticon using a string literal.

Just open your source file and type something like...

NSString *message = @"  ";

You can enter emoticons using the system wide special character panel. Open it in Xcode using ⌘⌥ T.

Nikolai Ruhe
  • 81,520
  • 17
  • 180
  • 200
  • i'm newbie in Xcode, can you show me some steps or an example? Thank you very much – realloxer Apr 21 '13 at 06:34
  • Thank you very much. But this is not what I want to ask, I already know how to using string literal. I want to know how to append string "\u" with "e405", "e407" (for example, i have an array like this) to print a unicode character but I only can get a String "\ u e 4 0 7". – realloxer Apr 22 '13 at 01:42