title: Expressing UTF-16 unicode characters in JavaScript
body: <p>To express, for example, the character U+10400 in JavaScript, I use <code>"\uD801\uDC00"</code> or <code>String.fromCharCode(0xD801) + String.fromCharCode(0xDC00)</code>.  How do I figure that out for a given unicode character?  I want the following:</p>
  
  <pre><code>var char = getUnicodeCharacter(0x10400);
  </code></pre>
  
  <p>How do I find <code>0xD801</code> and <code>0xDC00</code> from <code>0x10400</code>?</p>