Plugin doesn't set file encoding according to XML header line when loading an XML file
Opened this issue · 0 comments
dinkumoil commented
Description
If the header line of an XML file looks like that
<?xml version='1.0' encoding='utf-8'?>
i.e. attribute values are enclosed in single quotes instead of double quotes, the plugin doesn't set the file encoding of Notepad++ according to the header line's encoding
attribute when loading that XML file. However, syntax checking the file succeeds.
Steps To Reproduce
- With another editor, create an XML file with a header line like the one above.
- Go to Notepad++ settings and set the default file encoding in Notepad++ to ANSI.
- Restart Notepad++
- Load the file you created in step 1.
- Watch encoding indication in Notepad++ status bar. It is still ANSI instead of UTF-8 like it should be according to the XML file's header line.
Applies To
XMLTools plugin v3.1.1.13 (tested with 64 bit build).
Notepad++ v8.6.9 64 bit