Compare by Content: Show invisible characters in text mode

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Rekrul
Junior Member
Junior Member
Posts: 69
Joined: 2007-11-04, 21:40 UTC

Compare by Content: Show invisible characters in text mode

Post by *Rekrul »

Often when I compare two text files that look identical, TC will highlight lines as being different, but there is no visible difference between them. I suspect it flags these lines due to invisible character characters like spaces and tabs, but without being able to see them, I have to load the two files into a text editor, tell it to show invisible characters and compare them manually. It would be great if TC showed such characters when they differ between the two file. Other programs handle this by printing such characters in a different color and/or font.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Compare by Content: Show invisible characters in text mode

Post by *Usher »

For TC space is equal to tab - both are white spaces. There is also option to ignore repeated (white) spaces.

I think you should search for other characters, with almost invisible difference. Some punctuation marks for example, enlarged for better visibility:

` ' ´ (left accent, typewriter apostrophe, right accent)
- – — −(hyphen-minus, en dash, em dash, minus)
: ; (colon, semicolon)
Andrzej P. Wozniak
Polish subforum moderator
Rekrul
Junior Member
Junior Member
Posts: 69
Joined: 2007-11-04, 21:40 UTC

Re: Compare by Content: Show invisible characters in text mode

Post by *Rekrul »

Usher wrote: 2020-01-28, 14:17 UTC For TC space is equal to tab - both are white spaces. There is also option to ignore repeated (white) spaces.
Ignore repeated white spaces is already checked.

Make a text file with four lines and save two copies of it. Call them Test1.txt and Test2.txt. In the first one, put an extra space at the end of the first line and in the second one, put an extra space at the end of the third line. You will have two text files with the exact same size, but if you try to compare them, they won't be identical. It will go to the comparison window, but since the differences are invisible, it doesn't show you anything and you can't jump to the next difference.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Compare by Content: Show invisible characters in text mode

Post by *Usher »

If you want to see all the differences, you should use binary compare. Text compare by default is designed to work with visible text and ignore white spaces.

What is more, there may be only different some EOLs (End Of Line characters), all the text and white spaces may be identical. How do you compare such files in a text editor?
Andrzej P. Wozniak
Polish subforum moderator
Post Reply