Implements the automatic detection of encodings of XML documents