title: How can I put utf-16 characters in Android string resource?
body: <p>I want to use Emojis in my app's strings. All strings reside, of course, in strings.xml</p>
  
  <p>The problem is that not all Emojis are 16 bit friendly. Some Emojis can be represented as "normal" 16 bit hex: <strong>'\u26FF'</strong> but some are 32 bit hexes (UTF-16), usually represented as: <strong>'\x1F600'</strong>. I have no problem dealing with those inside the app, in code. But the strings.xml resource file is UTF8 encoded, and does not deal properly with non 16 bit escape chars.</p>
  
  <p>I tried using <strong>'\x1F600'</strong> - because I saw that <strong>'\u26FF'</strong> works just fine. But it seems not to devour the 'x' escape char. Nor did it like the regexp notation <strong>'\x{1F600}'</strong></p>
  
  <p>So I ended  up using a string placeholder <strong>'%1$s'</strong> and filling in the Emoji in code like this:</p>
  
  <pre><code>// greeting_3 is defined as: "hello there %1$s!"
  String s = context.getString(R.string.greeting_3, "");
  // OR:
  String s = context.getString(R.string.greeting_3, new String(Character.toChars(0x1F61C)));
  </code></pre>
  
  <p>This is not a very elegant solution... is there a proper way to put 32 bit UTF-8 chars in strings.xml ?</p>