Alex,
why so complicated? why don't just follow the comment 'XXX it might be good idea to change <?xml...encoding?>' and appropriate change xml preamble encoding?
If I submit my patch with a search and replace on the encoding= (if present) will you apply it? I really just want to get this fixed and into production.
Jon
