SUMMARY When i edit and save a file that was ASCII, for example windows batch file or CMakeLists.txt file, kate save it as UTF-8 with BOM, not ASCII, then for example, cmake is sensitive to being ASCII only, it give errors when it sees UTF-8 BOM in the file, that's how i noticed this behavior of kate, batch files also give error on the first line of the file becaues of this. There is a temporary workaround for this problem, every time i open ASCII file, i had to uncheck "Add Byte Order Mark" from the "Tools" menu, if i forget to uncheck, i have no idea which files i broke before they give errors. Kate also needs ASCII encoding in top of the Encodings list, so to be not confused with UTF-8 or not. STEPS TO REPRODUCE 1. Open an ASCII file 2. Edit 3. Save OBSERVED RESULT File is saved with UTF-8 BOM EXPECTED RESULT File should be saved with same encoding as it was previously, at least if BOM is not present before opening the file, it should not be present after saving too SOFTWARE/OS VERSIONS Windows: 10 20H2
Hmm, have you enabled the "Add Byte Order Mark" in the configuration dialog? Plain ASCII and UTF-8 are impossible to determine on loading, if all stays in the 0..127 range. I would just deactivate that setting globally.
marking as WAITINGFORINFO
i confirm bug is not found in current version of kate on windows and linux both, so i think its fixed