MDN self-hosted library · e01.org

Document: characterSet property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
console.log(document.characterSet);
// document's character encoding, such as "ISO-8859-1" or "UTF-8"