Bug 83548 - kompare finds no differences when file is edited under Windows
Summary: kompare finds no differences when file is edited under Windows
Status: RESOLVED DUPLICATE of bug 75917
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 3.2.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Otto Bruggeman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-17 20:04 UTC by Winfried Dobbe
Modified: 2004-12-14 16:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Winfried Dobbe 2004-06-17 20:04:17 UTC
Version:           3.2.1 (using KDE KDE 3.2.90)
Installed from:    SuSE RPMs
Compiler:          gcc 3.3.3 
OS:                Linux

This might be a duplicate of bug 75917, but since two problems are reported in that one, I'll open a new.

When a file has been edited under Windows, all lines are different because of CR/LF. However sometimes Kompare reports that the file is identical to the original, unedited file. For example:

diff externalprocessview.hnew ../rtk/src/externalprocessview.h

indicates that all lines are different, however

kompare externalprocessview.hnew ../rtk/src/externalprocessview.h

indicates that the files are identical, where the .hnew file is the windows edited file.
Comment 1 Winfried Dobbe 2004-06-18 09:20:46 UTC
I forgot to mention that even if the edited file contains "real" changes apart from the CR/LF's, kompare still indicates that the files are identical.
Comment 2 Otto Bruggeman 2004-06-21 09:59:33 UTC
I believe this has to do with the fact that kompare uses the -bB diff flag by default. Try unsetting this one in the diff options. If that works close the bug please.
Comment 3 raspl 2004-06-21 18:01:00 UTC
I can confirm this bug, but it is even worse: Try to compare two _completely_ different files, like a README with your favorite .c-source file (not even a single line is matching): The result is that kompare will not only report no differences, but also display one of the two files in both windows!
So the above reported error is just a very special case of this (all lines are different), but since most editors won't show you the different CR/LF (including the displays in kompare), this was unnoticed before.
Comment 4 Winfried Dobbe 2004-06-22 07:02:54 UTC
In the reported case both the options "ignore added or removed empty lines" and "ignore changes in the amount of white space" were turned off in Kompare. However when I turn these options on and restart kompare (apply doesn't seem to have any effect...) it shows some (!) changes at the beginning of the file but still ignores some real changes (not CR/LF) related. For ignored changes it shows the contents of the first file in both the left and the right view. Strange behaviour.
Comment 5 Luke Plant 2004-07-20 19:59:56 UTC
For files with dos/Windows line ends, Kompare doesn't  show changed or deleted lines, only inserted lines, and displays the second file as if it was just the first with those insertions.  If the two files are completely different, every line is effectively a changed line, and the two files are shown as identical to the first.

The commandline programs unix2dos and dos2unix can be used both to confirm this bug and as a temporary work-around for those comfortable on the command line.
Comment 6 Otto Bruggeman 2004-08-21 17:37:38 UTC
This is all related to the -bB option, closing as a duplicate of 75917

*** This bug has been marked as a duplicate of 75917 ***
Comment 7 Klaus Rieger 2004-12-14 16:52:29 UTC
I've just proved the KDE 3.3.2 version: The problem is solved!

Thank you very much!