How to get and set document character encoding in Javascript
Get and set char set
document.charset
gets or sets the document character set encoding.
Example
<!DOCTYPE HTML>
<html>
<body>
<script>
document.writeln(document.charset);
</script>
</body>
</html><!-- w ww . java2 s . c om-->