tests on document's character encoding