What use is the ‘encoding’ in the XML header?
As you mentioned, you’d have to know the encoding of the file to read the encoding attribute. However, there is a heuristic that can easily get you close enough to the “real” encoding to allow you to read the encoding attribute. This works, because the <?xml part by definition can only contain characters in the … Read more