title: Decode or unescape \u00f0\u009f\u0091\u008d to
body: <p>We all know UTF-8 is hard. I exported my messages from Facebook and the resulting JSON file escaped all non-ascii characters to unicode code points.</p>
  
  <p>I am looking for an easy way to unescape these unicode code points to regular old UTF-8. I also would love to use PowerShell.</p>
  
  <p>I tried</p>
  
  <pre><code>$str = "\u00f0\u009f\u0091\u008d"
  [Regex]::Replace($str, "\\[Uu]([0-9A-Fa-f]{4})", `
  {[char]::ToString([Convert]::ToInt32($args[0].Groups[1].Value, 16))} )
  </code></pre>
  
  <p>but that only gives me <em>ð</em> as a result, not .</p>
  
  <p>I also tried using Notepad++ and I found this SO post: <a href="https://stackoverflow.com/questions/25105900/how-to-convert-escaped-unicode-e-g-u0432-u0441-u0435-to-utf-8-chars-%D0%B2%D1%81%D0%B5-in">How to convert escaped Unicode (e.g. <code>\u0432\u0441\u0435</code>) to UTF-8 chars (все) in Notepad++</a>. The accepted answer also results in exactly the same as the example above: <em>ð</em>.</p>
  
  <p>I found the decoding solution here: the <a href="https://github.com/mathiasbynens/utf8.js/blob/master/utf8.js" rel="noreferrer">UTF8.js library</a> that decodes the text perfectly and you can <a href="https://mothereff.in/utf-8#%F0%9F%91%8D" rel="noreferrer">try it out here</a> (with <code>\u00f0\u009f\u0091\u008d</code> as input).</p>
  
  <p>Is there a way in PowerShell to decode <code>\u00f0\u009f\u0091\u008d</code> to receive ? I'd love to have real UTF-8 in my exported Facebook messages so I can actually read them.</p>
  
  <p>Bonus points for helping me understand what <code>\u00f0\u009f\u0091\u008d</code> actually represents (besides it being <a href="http://www.fileformat.info/info/unicode/char/1F44D/index.htm" rel="noreferrer">some UTF-8 hex representation</a>). Why is it the same as <code>U+1F44D</code> or <code>\uD83D\uDC4D</code> in C++?</p>