characterSet

Returns document's encoding.

MDN Reference