title: Escape Unicode Characters for iOS
body: <p>There are some Unicode arrangements that I want to use in my app. I am having trouble properly escaping them for use.</p>
  
  <p>For instance this Unicode sequence: </p>
  
  <p>If I escape it using an online tool i get: \ud83c\udd70</p>
  
  <p>But of course this is an invalid sequence per the compiler:</p>
  
  <pre><code>var str = NSString.stringWithUTF8String("\ud83c\udd70")
  </code></pre>
  
  <p>Also if I do this:</p>
  
  <pre><code>var str = NSString.stringWithUTF8String("\ud83c")
  </code></pre>
  
  <p>I get an error "Invalid Unicode Scalar"</p>
  
  <p>I'm trying to use these Unicode "fonts":
  <a href="http://www.panix.com/~eli/unicode/convert.cgi?text=abcdefghijklmnopqrstuvwxyz" rel="nofollow">http://www.panix.com/~eli/unicode/convert.cgi?text=abcdefghijklmnopqrstuvwxyz</a></p>
  
  <p>If I view the source of this website I see sequences like this:</p>
  
  <pre><code>&amp;#x1D552
  </code></pre>
  
  <p>Struggling to wrap my head around what is the "proper" way to work with/escape unicode.</p>
  
  <p>And simply need a to figure out a way to get them working on iOS.</p>
  
  <p>Any thoughts?</p>