title: How do I convert special UTF-8 chars to their iso-8859-1 equivalent using javascript?
body: <p>I'm making a javascript app which retrieves <code>.json</code> files with jquery and injects data into the webpage it is embedded in.</p>
  
  <p>The <code>.json</code> files are encoded with UTF-8 and contains accented chars like é, ö and å.</p>
  
  <p>The problem is that I don't control the charset on the pages that are going to use the app.</p>
  
  <p>Some will be using UTF-8, but others will be using the iso-8859-1 charset. This will of course garble the special chars from the <code>.json</code> files.</p>
  
  <p>How do I convert special UTF-8 chars to their iso-8859-1 equivalent using javascript? </p>