check the encoding of this document