morbac / xmltools

XML Tools plugin for Notepad++
GNU General Public License v3.0
257 stars 57 forks source link

"Pretty print ALT+SHIFT+B" command drops BOM on UTF-8 BOM files #208

Open SeeSharpr opened 7 months ago

SeeSharpr commented 7 months ago

Repro steps

  1. Open an XML file encoded as UTF-8 BOM (or open any file and set its encoding to UTF-8 BOM encoding, saving the file afterwards)
  2. Hit CTRL+SHIFT+B

Expected results

  1. Text is formatted as expected
  2. Encoding doesn't change

Actual results

  1. Text is formatted as expected
  2. Encode changes to UTF-8

Remarks

It could be the case that BOM is configurable through some of the existing options, but if that is the case, the description is not clear or doesn't follow Notepad++ nomenclature.