HTML DOM inputEncoding property
Example
Show the character encoding of the current document:
document.inputEncoding;
Output result:
UTF-8
Try it »
Definition and Usage
The inputEncoding property returns the encoding of the document (at parse time).
If it was created in memory, it returns null .
Browser support





All major browsers except Opera support the inputEncoding property.
Note: Internet Explorer 8 and earlier IE versions do not support this property.
Syntax
document.inputEncoding
Technical Details
| Return Value: | String returning the document encoding |
|---|---|
| DOM version | Core Level 3 Document Object |
Document Object