Version: (using Devel) Installed from: Compiled sources I have configured kwrite with default encoding iso-8859-1. In a directory I have a file named ".kateconfig" with only one entry: kate: encoding utf8; If I open a file from this directory, the file is displayed as ISO-8859-1, although in the extras->encoding menu-entry UTF-8 is selected as it should. But I have to select it manually again to have the utf-8 encoding applied. This shows, that the configuration from .kateconfig is really read, but not correctly applied. (I tried without the config-file: then in the menu iso-8859-1 was selected) This bug appears in kwrite from trunk, but also in kwrite/kde3 ( I would really really like to see this fixed in both versions!)
would be nice to get feedback, because I often save my files from different projects in wrong encoding by mistake, and I don't know any alternative to solve this problem. per-folder config seems to be a unique but really usable feature, if it would work.
does someone read this? this is a really serious bug.. I had a look into kate sourcecode. In katedocument.cpp readconfig() is called after loading the file, but the for the encoding to be set, the file has to be reloaded? I don't know if I get fixed this by myself..
I have patched the function "openfile()" in katedocument.cpp to call "readconfig()" before loading the file. I think it shouldn't matter if we read the config file even, if the load does not succeed, or am I wrong? Seems to work so far. // read dir config (if possible and wanted) readDirConfig (); // do we have success ? bool success = m_buffer->openFile (m_file);
my workaround is not the optimal solution, because now, if kate finds a config-file, I cannot change the encoding manually afterwards for files in that directories, but for me it's still better as before.
*** This bug has been marked as a duplicate of bug 125974 ***