When did you removed the BOM from WinSCP? I'm running 5.20.2 (I got it from you to test some of the changes you did).
I tested this in 5.19.5 and when changing "Default encoding" to UTF-8 it added a BOM when I saved a file, but it seems that so isn't the case anymore. Very strange.
I did found something in the history from 5.19 2021-06-17: Bug fix: When installing an extension from a file, it is always saved in UTF-8 with BOM, disregarding the original encoding, but I don't know what this has to do with the internal editor?
In any case, it will still show "1252 ANSI Latin 1" in the status bar Encoding when I open a UTF-8 file without a BOM if Default encoding is set to ANSI.
Something I also noticed was that if I change Encoding from ANSI to UTF-8 (without changing anything else) and I then close the file, the changes will not be saved. It won't even let me save the changes from ANSI to UTF-8 (the Save icon is still greyed out). So, it seems that changing encoding will not do anything to the file, or does it?
If I create a new file as ANSI (Default encoding set to ANSI) and I save it as ANSI the file will be an ANSI file according to the internal editor and Notepad++ (Windows). If I take the same file and convert it to a UTF-8 file in the internal editor, do some changes to the file (I'm forced to do that or else it will not allow me to save the file) and save it as UTF-8. If I now open it in the internal editor it will still show that this is an ANSI file, but if I open the file in Notepad++, it will now show it is a UTF-8 file. Very confusing.
It seems that the internal editor will only show Encoding: UTF-8 if the file has a BOM or if I set Default encoding to UTF-8. If Default encoding is set to UTF-8, all files will now show up as UTF-8 even if the file is in ANSI format. Also very confusing.
Shouldn't the Encoding show the encoding of the open file? Now it only seems to show the value of the Default encoding. One exception and that is when I open a UTF-8 file with a BOM. Now it will show UTF-8 even if Default encoding is set to ANSI.