Binary Compare Files by Content: RED dots for values 0D, 0A

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
norfie²
Power Member
Power Member
Posts: 986
Joined: 2006-02-10, 07:27 UTC

Binary Compare Files by Content: RED dots for values 0D, 0A

Post by *norfie² »

If comparing two totalcmd-log files (UTF8 format) and switch to binary compare then all (identical) new line characters i.e. 0D 0A are shown on the right text view with RED dots . instead of black dots . .
"War is evil, in so far as it makes more bad people than it takes away."
Immanuel Kant in "Perpetual Peace"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe I misunderstand you, but I can't reproduce the problem. Here is what I tried:
1. Make a copy of totalcmd_log file
2. Do some operation which changes the original file
3. Compare the teo - UTF-8 is enabled for both sides
4. Switch to binary and recompare

Result: Only the newly added lines are shown in red.
Author of Total Commander
https://www.ghisler.com
User avatar
norfie²
Power Member
Power Member
Posts: 986
Joined: 2006-02-10, 07:27 UTC

Post by *norfie² »

2ghisler(Author)
You 're right in all - misunderstanding and your description.
Result is yours AND additional in the text view on the right side of both sides all identical characters with 0D 0A are shown with dots. This dot is red . but it should be a black . one. Please have a look at the screenshot from this post
http://www.ghisler.ch/board/viewtopic.php?p=326327#326327
There are the 0D 0A marked in binary view side and on the text view side the dots are red.
"War is evil, in so far as it makes more bad people than it takes away."
Immanuel Kant in "Perpetual Peace"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you have different line breaks from Windows and Linux, then you will of course see a difference here. Just use text mode for download to conver the Linux line breaks to Windows line breaks.
Author of Total Commander
https://www.ghisler.com
User avatar
norfie²
Power Member
Power Member
Posts: 986
Joined: 2006-02-10, 07:27 UTC

Post by *norfie² »

What does it matter? It has nothing to do with the differences between Windows and Linux. What do you think was my reason that I used the totalcmd.log example? It's a problem with UTF8 (pure ASCII files are ok) that the wrong color is shown. I'm outta here.
"War is evil, in so far as it makes more bad people than it takes away."
Immanuel Kant in "Perpetual Peace"
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

2norfie²
I'm trying to reproduce it with sample XML files, but it doesn't show up for me, no matter what I try.
TC 9.0a final, both 32- and 64-bit, Win7 x64.

Could you upload two sample files which trigger this behavior? And does it work back in TC 8.5 or older versions?
TC plugins: PCREsearch and RegXtract
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2norfie² & 2milo1012

I can confirm it: http://madsenworld.dk/tcmd/binaryutf8comp.png

TC 8.52a behaves the same way.

Sample files: http://madsenworld.dk/tcmd/binaryutf8comp.zip
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I can't reproduce this on XP. Instead of the dots I get the "regular" squares which are typical when some character is missing from the used font. I guess this has something to do with fonts. On Win7 I get the dots, but they're normal black... [ADD] unless I use a fresh wincmd.ini [/ADD]

[ADD2]
Since I use some dark blue for differences it looked like the dots were black, but they're not. Setting the color back to a lighter one (green or the default red) makes it easier to detect - they indeed use the diff color. So I can confirm the issue on Win7 with the test files provided by petermad.
[/ADD2]

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

petermad wrote:I can confirm it: http://madsenworld.dk/tcmd/binaryutf8comp.png
...
Thx, now I can confirm this as well.

But I tried to reproduce the exact highlighting as in the OP linked image
http://mikdoe.lima-city.de/binaervergleich.png
but this is still not working for me, and is really strange anyway, as there are only the newline chars highlighted.


And BTW, concerning that confirmed behavior: I don't think that you can call this a bug, as it's just a different line content. You need to take the newline character(s) before the line's content into account, and so TC does the right thing:
- highlight the last two line's content in grain (including the prefixed newline char) on both sides for the text part, as these are the lines that are different
- highlight just the added bytes for the hex part
So in conclusion: TC assumes the prefixed newline char(s) belonging to a line. The same happens if you copy a single highlighted line from the CBC tool into a text editor: you'll get a prefixed empty line, due to TC copying it to clipboard with the prefixed newline char(s).
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in TC 9.10 beta, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I can confirm the fix in TC 9.10b1 - at least with the previous sample files: http://madsenworld.dk/tcmd/binaryutf8comp.zip
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply