Version: (using KDE KDE 3.5.2) Installed from: Gentoo Packages This is related to bug #125417 and might well be a Kate-bug. I've made a .kateconfig. Kdevelop clearly uses it, but still files aren't shown correctly. Example: I have a file in 8859-1 with Danish characters in it. They are displayed as squares, but the encoding is set correctly at 8859-1. If I change the encoding (tools->encoding), the characters are displayed accordingly -- but the setting doesn't change! It's stuck at 8859-1. So it would seem the only the setting (not the display) is affected by the .kateconfig. The save-as dialogue has the correct 8859-1 option selected.
Yes, this would be a katepart bug. KDevelop doesn't read the .kateconfig file, katepart does and the menu action is merged in by katepart. Reassigning.
Kate sets the encoding after loading the file, but it doesn't reload the file with the right encoding. Still valid in KDE4.
related bug for kate modelines: bug #125974
related bug for kate modelines: bug #187033 (comment #8 is wrong number) related bug for modes/filetypes: bug #159135
*** Bug 202409 has been marked as a duplicate of this bug. ***
Please, please please someone have a look at this. This bug exists for years now, and I think will be easy to fix for someone who has good knowledge of the kate code. I fixed this bug successfully for the kde3 version, see http://reviewboard.kde.org/r/1915/ but when I apply the same bugfix strategy for the kde4-version, it works (and I really patch every new kate-package in my opensuse installation with my fix), but not completely (the menubar-entry is not updated), and I could not figure out, how to fix that. I have so many projects with different encoding, and this feature really helps me much to not mess up my files in different directory trees.
here is my actual diff, that I apply regularly for me: Index: document/katedocument.cpp =================================================================== --- document/katedocument.cpp (Revision 1150298) +++ document/katedocument.cpp (Arbeitskopie) @@ -2070,6 +2070,11 @@ history()->doEdit( new KateEditInfo(Kate::CloseFileEdit, documentRange(), QStringList(), KTextEditor::Range(0,0,0,0), QStringList()) ); emit KTextEditor::Document::textRemoved(this, documentRange()); + + // read dir config (if possible and wanted) + if (!m_reloading) + readDirConfig (); + bool success = m_buffer->openFile (localFilePath()); // disable view updates @@ -2087,9 +2092,6 @@ // update file type updateFileType (KateGlobal::self()->modeManager()->fileType (this)); - // read dir config (if possible and wanted) - readDirConfig (); - // read vars readVariables();
could you please please fix this bug?
Sorry, but just applying your patch won't cut it, as then we have no longer the filetype => dir config => variables levels.
btw I have a review request pending here: https://git.reviewboard.kde.org/r/106420 How do you think can this problem be solved? I am willing to invest some more work, if you could explain me how I should do it right.
Git commit 902ce49204de1035910cc504e249fd0eacf64471 by Christoph Cullmann. Committed on 01/11/2012 at 18:23. Pushed by cullmann into branch 'master'. add encoding: xxxx modeline change order of reading of variables that it can have effects for load/save for .kateconfig and on save for variable in the file itself REVIEW: 106420 needed more modifications than in review request 106420, otherwise we regress M +8 -0 doc/kate/configuring.docbook M +33 -24 part/document/katedocument.cpp M +10 -2 part/mode/katemodemanager.cpp M +1 -1 part/mode/katemodemanager.h http://commits.kde.org/kate/902ce49204de1035910cc504e249fd0eacf64471
I am sorry your review request got not action that long. I look at it and fixed the remaining problems myself. Thanks for the contribution, btw.!
thank you very much! You just made my day!