title: How to convert emoticons to its UTF-32/escaped unicode?
body: <p>I am working on a chatting application in WPF and I want to use emoticons in it. I am working on WPF app. I want to read emoticons which are coming from Android/iOS devices and show respective images.</p>
  
  <p>On WPF, I am getting a black Emoticon looking like <img src="https://i.stack.imgur.com/kUTXi.png" alt="this">.  I somehow got a library of emoji icons which are saved with respective hex/escaped unicode values.
  So, I want to convert these symbols of emoticons into UTF-32/escaped unicode so that I can directly replace related emoji icons with them.</p>
  
  <p>I had tried to convert an emoticon to its unicode but end up getting a different string with couple of symbols, which are having different unicode.</p>
  
  <pre><code>string unicodeString = "\u1F642";  // represents  
  
  Encoding unicode = Encoding.Unicode;
  byte[] unicodeBytes = unicode.GetBytes(unicodeString);
  
  char[] unicodeChars = new char[unicode.GetCharCount(unicodeBytes, 0, unicodeBytes.Length)];
  unicode.GetChars(unicodeBytes, 0, unicodeBytes.Length, unicodeChars, 0);
  string asciiString = new string(unicodeChars);
  </code></pre>
  
  <p>Any help is appreciated!!</p>