Inside Mozilla all text is encoded as Unicode. By standardizing on Unicode every piece of code that handles characters no longer needs to:
Have access to a character encoding parameter. Ask is the data stateful? Ask is the data single byte? Ask is the data multi-byte? If multi-byte: have access to a routine that can determine how many bytes in the current character.
When the document is read in a converter is used to convert the document's data to Unicode.
nsIDocCharset provides the ability to:
See what converter was used when inputting the documents data.
Override the character set for documents where the specified fallback, or auto-detected character set is incorrect
Public Member Functions
|NS_IMETHOD_ (nsrefcnt) Release(void)=0|
|NS_IMETHOD_ (nsrefcnt) AddRef(void)=0|
|NS_IMETHOD||QueryInterface (REFNSIID aIID, void **aInstancePtr)=0|