Many standard encoding labels are not understood by libxml, so we must insert
our own XML declarations to add encoding information which libxml will
understand.
This has exposed an error in the assumptions about BOM handling in the
XML parser. Proper handling of external encoding information will take
more effort than aniticpated.