0
Problem: I am passing the value of an input to a frame but the encoding format is not as it should be - charset=ISO-8859-1
Trying that:
<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>
because it doesn’t use UTF-8 instead of ISO-8859-1 ??
– WeezHard