comparing files by command cm_CompareFilesByContent

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
GeminiAlpha
Junior Member
Junior Member
Posts: 25
Joined: 2005-06-02, 17:42 UTC
Location: Netherlands

comparing files by command cm_CompareFilesByContent

Post by *GeminiAlpha »

comparing 2 txt files by the built-in TC command:
cm_CompareFilesByContent
leads to faulty conclusion "files are equal" or "0 differences found",
if the difference is only [0Ahex"] or [0D 0Ahex] is used as lineseparator throughout the 2 files. (filelength's are different).
explained
This flaw was discovered by comparing .map files "belonging" to oziexplorer by Des Newman, either for handheld (files with only 0A as separator) or .map files for PC use (files with 0D 0A as separator.
.map Files with only 0A as separator do not work on PC.

if more/other info is required, please ask.

Rudolf
User avatar
petermad
Power Member
Power Member
Posts: 14812
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

IIRC that's a feature, not a bug.

Use the "Binary" option to compare unix and dos files with the same content if you want to see the differencies.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
GeminiAlpha
Junior Member
Junior Member
Posts: 25
Joined: 2005-06-02, 17:42 UTC
Location: Netherlands

Post by *GeminiAlpha »

petermad wrote:IIRC that's a feature, not a bug.

Use the "Binary" option to compare unix and dos files with the same content if you want to see the differencies.
I know nothing about unix files nor the differences with dos files.
I just compared 2 txt files that are not equal because they have different filsizes.
After comparing those 2, I expect to get a show of the differences, not the answer "0 differences", because thats not true!
I am just an enduser, not an IT freak nor developer.
There should be a way to tell me the real differences while in txt view mode, because they LOOK equal, but are NOT.

anyway, thanks for answering!
Rudolf
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

There should be a way to tell me the real differences while in txt view mode
In txt view, the text content IS exact identical.
You are talking about control characters (0D 0A) which are binary only (no text)

Every compare tool has to do it this way !

If you tag a UNIX file different from a DOS file just due to their CR, you will never ever get your files synchronized with an FTP server.
You could upload you file as often as you want, they will stay different for ever (or are unusable on remote site)

As petermad pointed out: Use "binary compare" if you want to see binary differences.
#5767 Personal license
User avatar
GeminiAlpha
Junior Member
Junior Member
Posts: 25
Joined: 2005-06-02, 17:42 UTC
Location: Netherlands

Post by *GeminiAlpha »

sqa_wizard wrote:
There should be a way to tell me the real differences while in txt view mode
In txt view, the text content IS exact identical.
You are talking about control characters (0D 0A) which are binary only (no text)

Every compare tool has to do it this way !

If you tag a UNIX file different from a DOS file just due to their CR, you will never ever get your files synchronized with an FTP server.
You could upload you file as often as you want, they will stay different for ever (or are unusable on remote site)

As petermad pointed out: Use "binary compare" if you want to see binary differences.
I got the message!
I did not know unix txt files are differently formatted than dos txt files (when the txt content is equal). Thanks for the lesson.

It would be nice if a txt compare also showed "LF" or "LF CR" just to indicate this kind of differences. Comparing txt files in binary mode is not user friendly in my opinion.
Idea for Christian to enhance the compare function?

B.t.w. do you know a tool to do a conversion back and forth? I mean change LF into CR LF or the other way around?
Rudolf
Post Reply