HTML DOM Document characterSet
Example
Get the character encoding for a document:
encoding = document.characterSet;
Try it Yourself »
Description
The characterSet
property returns the character encoding for a document.
See Also:
Deprecated Aliases:
Syntax
document.characterSet
Return Value
Type | Description |
String | The document's character encoding. |
Browser Support
document.characterSet
is a DOM Level 3 (2004) feature.
It is fully supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.