title: How do I set the character encoding of a child window
body: <p>I'm opening a child window and writing contents into it in JavaScript. The parent page has UTF-8 an the character set, but the child window opens with ISO-8859-1</p>
  
  <p>I've tried using document.write to set the child page content type using the meta tag, but it appears to have no effect.</p>
  
  <pre><code>launcherHtml = '
    &lt;!DOCTYPE html&gt;
    &lt;html&gt;
      &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  '
  
  sandbox = window.open()
  sandbox.document.open()
  sandbox.document.write(launcherHtml)
  sandbox.document.close()
  
  sandbox.document.characterSet // ISO-8859-1 !!!
  </code></pre>
  
  <p>I've also tried using <code>&lt;meta charset="UTF-8"&gt;</code> as the tag in the child window but the results are the same.</p>
  
  <p>How do I properly specify the charset of a popup window as UTF-8?</p>