Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cjohansen
Created September 16, 2013 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cjohansen/6584215 to your computer and use it in GitHub Desktop.
Save cjohansen/6584215 to your computer and use it in GitHub Desktop.
I'm looking for a way to dynamically specify the encoding of a file that is loaded into the browser locally as a file://
<head></head>
<body>
<script>
document.head.innerHTML += "<meta charset=\"utf-8\">";
document.body.innerHTML += "✓";
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment