SUMMARY This is a side-effect/addition for Bug 410007. I think these to problems below are related, so I don't split them in two bugs. 1. When comparing two directories, if I double click on the file that exists in one directory and doesn't exist in another, Kdiff3 shows empty line diff area. No content of any existing file is shown. 2. If I compare two binary files, equal or different, nothing is shown in line diff area (version 0.9.98 was showing some binary-to-text interpretation of file contents) STEPS TO REPRODUCE 1. 1. Compare two directories 2. Find any file, which exists in A and doesn't in B (or vise-versa) 3. Double click to show line diff OBSERVED RESULT Line diff area is white and empty. No content of any file is shown. EXPECTED RESULT Content of existing file is shown, line diff area is blank for non-existing file. STEPS TO REPRODUCE 2. 1. Compare two directories 2. Find any two binary files (equal or different) 3. Double click to show line diff OBSERVED RESULT "Some input characters couldn't be converted to valid unicode" message is shown, line diff area is white and empty. No content of any file is shown. EXPECTED RESULT Some binary-to-text interpretation of binary files is shown, different areas highlighted, like in version 0.9.98. SOFTWARE/OS VERSIONS Linux: Gentoo Linux KDE Plasma Version: 5.16.3 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION Kdiff3 is built from KDE overlay for Gentoo (kdiff3-9999), it's the only 9999 package in the system, other KDE/Qt related packages are from the main tree, testing branch.
Git commit 2c8c09e06ff97ff171181674507590e28c8fd618 by Michael Reeves. Committed on 26/07/2019 at 22:00. Pushed by mreeves into branch 'master'. Fix text file diff not shown on comparison to empty/missing file. M +2 -2 src/SourceData.cpp M +1 -1 src/SourceData.h https://invent.kde.org/kde/kdiff3/commit/2c8c09e06ff97ff171181674507590e28c8fd618
Git commit b1b4cb830c4a8f5b01b8ca018a17edf4de162ca7 by Michael Reeves. Committed on 26/07/2019 at 21:56. Pushed by mreeves into branch '1.8'. Fix text file diff not shown on comparison to empty/missing file. M +2 -2 src/SourceData.cpp M +1 -1 src/SourceData.h https://invent.kde.org/kde/kdiff3/commit/b1b4cb830c4a8f5b01b8ca018a17edf4de162ca7
The first case now fixed as this was an unintended regression. I am not going to say that the second case will not be coming back. However I have concerns over how kdiff3's current comparison code behaves in this case. Anything beyond basic binary equality testing seems to assume its working with a text file of some kind. As a result binary data can trigger odd corner cases that text files don't hit. To avoid this kdiff3 currently does not run such code for binary files. I'll have to look into this further to see just what would be needed for binary comparison to come back.