I’ve recently been experiencing problems with Kate. It has started inserting invisible characters at the start of every file that it saves. The characters are (hex) EF BB BF. This happens simply by saving the file whether I actually edit it or not. KWrite does not do this, only Kate. I am running Kate 3.12.4 under KDE 4.12.4 in 64bit OpenSuse 13.1. I only recently noticed this in that shell scripts I’ve edited started to return command not found error messages. When I use Okteta to remove the extraneous characters, the scripts run fine. These are scripts that I originally created in Kate sometime in the past.
Is there some setting I don’t know about in Kate that may be doing this or is it a brand new bug?
Hm, I have never seen anything like this, and I cannot reproduce it right now either. (I too have KDE 4.12.4/Kate 3.12.4 installed)
But, (hex) EF BB BF is the “Byte Order Mark”: http://en.wikipedia.org/wiki/Byte_order_mark
So check the setting “Enable byte order marker” in “Configure Kate…”->“Editor Component”->Open/Save->General and disable it if activated.
Well, that’s about encoding detection (i.e. to find out whether a text file is encoded in UTF-8 or Latin-1 and so on), not about that BOM option.
But I think this does exist for quite some time already as well.