Created attachment 57535 [details] source files and patches Version: 4.0.0 (using KDE 4.6.0) OS: Linux When the original files are in one-byte character sets, the patch produced by Kompare fails. Reproducible: Always Steps to Reproduce: 1. Tell Kompare to save the difference between la1.txt and utf8.txt into Kompare.diff. 2. { patch <Kompare.diff; } Actual Results: 2. patching file la1.txt Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file la1.txt.rej Expected Results: 2. Clean patch. OS: Linux (x86_64) release 2.6.34.7-0.7-desktop Compiler: gcc
Note: this bug makes Kompare absolutely useless for generating patches because you can never be sure whether such a patch can be successfully applied until you try (source code files often contain accented characters in comments as ISO Latin 1). Kompare does not try to adapt to this reality; it does not even emit a warning.
You have to change the character set. The default is UTF-8. (FWIW, source files which are still in Latin 1 really need to be fixed. Those Latin 1 characters will also be clobbered when edited with a modern editor which defaults to UTF-8.)
(In reply to comment #2) > You have to change the character set. The default is UTF-8. > > (FWIW, source files which are still in Latin 1 really need to be fixed. > Those Latin 1 characters will also be clobbered when edited with a modern > editor which defaults to UTF-8.) A "modern" editor that clobbers Latin 1 characters because the default is UTF–8 (like e.g. Microsoft Web Developer, shame on them) is just dumb, my good sir. (Fortunately, KWrite does not subscribe to your POV on this subject any more.)
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone!
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Comparing la1.txt and utf8.txt returns no differences now (even though they are different according to command line diff).