title: How to decode Chinese hex string into Chinese characters or JavaScript?
body: <p>I am working on a Rails app.</p>
  
  <p>I am using an API that returns some Chinese provinces.
  The API returns the provinces in hex strings, for example:</p>
  
  <pre><code>{ "\xE5\x8C\x97\xE4\xBA\xAC" =&gt; "some data" }
  </code></pre>
  
  <p>My JavaScript calls a controller that returns this hash. I put all the province strings into a dropdown but the strings show up as a black diamond with a question mark in the middle. I am wondering how do I convert the Ruby hex string into actual Chinese characters, 北京? Or if possible, can I convert the hex string in JavaScript into Chinese characters?</p>