<html>
<head>
<title>Frame</title>
</head>
<body>
<script>
    chs = document.inputEncoding;
    if (!chs)
        chs = document.charset;
    if (!chs)
        chs = document.characterSet;

    console.log(chs);
</script>

</body>
</html>
