Problem: I am passing the value of an input to a frame but the encoding format does not stay as it should - charset = ISO-8859-1
Trying this:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
function update() {
var html = document.getElementById('edit').value;
var encodedHtml = unescape(encodeURIComponent(html));
document.getElementById('carregar').src = 'data:text/javascript;charset=utf-8,' + encodedHtml;
}
window.onload = update;
</script>
<input type="hidden" id='edit' onkeyup='update();' onchange='update();' onload='update();' value='ação e reação'>
<iframe id='carregar' style='width:100%;border:1px solid gray;height:50%;'></iframe>