Closed SlyNet closed 8 years ago
I found the same issue. How could I help in fixing this?
Same here. I have a file with <?xml version="1.0" encoding="ISO-8859-1"?> saved with ISO-8859-1 encoding.
Startet the "Indent XML" command which broke the encoding in the file.
A quick but annoing workaround:
Hi guys, First of all, the reason of original issue is mismatch of encoding="ISO-8859-1" in XML header of the source XML and file itself. Note that despite your file is saved in UTF8 XML declares that it has ISO-8859-1 standard. And å symbol is NOT a part of this standard. Thus formatter converts å into string according to a ISO-8859-1 standard.
So solution is - you need to decide which encoding is your XML data (not file). If that is ISO-8859-1 - it should not contain non-latin symbols. If that is UTF - just remove XML header or put 'UTF-8' there and formatting will work ok.
So sorry but I don't think I'm planning to resolve this any time soon. If you have any ideas how to carefully combine XML file encoding and XML header encoding - feel free to submit pull requests.
Cheers, Alexey.
If I reformat following XML:
It produces