Re: File-Compare "fc" falsely reports mismatch between identical files

Tech-Archive recommends: Fix windows errors by optimizing your registry



Al Dunbar wrote:
"billious" <billious_1954@xxxxxxxxxxx> wrote in message
news:4a3604db$0$32349$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"Al Dunbar" <alandrub@xxxxxxxxxxx> wrote in message
news:uzMbbFT7JHA.4116@xxxxxxxxxxxxxxxxxxxxxxx

<snip>

Right. On my system FC /? indicates that this means to display only
the first and last lines of each set of differences, whereas /L is
said to compare files as ascii text.

[FC /L /A]

And if it is LINES that are being compared, what is the difference
between /A and /L mode? Both are line-oriented.

apparently

Ah - be very, very literal.

The default mode is apparently /L

If /A is used, then the begin/end lines of the mismatch-block are shown.

For instance, if lines are APPENDED to a file, then FC and FC/L give
identical results, showing the last-line-matching and the new-lines-added.

FC/A shows

the last-line-matching
....
the last-line-added

(where ... is literally that, ...)

(I tried this by simply appending lines; I did not try inserting a block of
lines in the middle of a file)

So there IS a difference.



[behaviour with "non-ASCII" files]

[snip]


Much heartache is caused by the assumption that what is "standard" in
Redmond is some variety of universal standard.

You've made this assumption? I haven't.


Far from it - in fact, I've done a great deal of work to REVERSE the
consequences of this assumption.

There is however, a crowd based in Redmond that has accumulated itself a
vast herd of zombie-acolytes who, should you protest their assumption of the
right to create and change standards at will and whim, will hiss with
religious fervour "reboot the unbeliever."



The lack of an absolute definition of what a text file is does not
mean that there is no benefit in making the distinction between ASCII
or text and binary.

The distinction is made by humans, for human purposes.


[what constitutes a failure?]

Could it be that FC simply fails to fail? (and from there, why?)

Well, as I have tried to imply, I am not convinced that it is
rationale to suggest that a tool can be said to fail when it is used
in a manner and for a purpose which it was clearly not intended ;-)


FC has no documented limit. It may be that this problem only occurs when the
"line length" exceeds a given size. "clearly not intended?" Er, there's
always going to be someone who wants one more character, as I said - either
on the length or in the character-set being procesed.

FC /B processes byte-by-byte
FC [/L] processes in records delimited by a terminal CRLF (or EOF)
FC /A modifies and restricts FC /L's report.

There's no documented limit of how long there records may be. There is an
application-specific human interpretation, but that depends on the human's
definition.




Interesting analogy. Perhaps MS will be forced to fix FC when it has
been demonstrated to be a serious problem, serious meaning something
like lawsuits ;-)

Oh - you mean like they fixed the parsing into FCB2 with Dos - er, 6?, 5? 4?

You mean - meaningful documentation?

Yes. But I'm not holding my breath on this or on any of the many other
things that could stand to be corrected. Like, for example, when you
shutdown a windows 98 system, it is left with a message on the screen
to the effect that: it is now safe to turn your computer off. When it
was my employer's computer that I was shutting down, I wondered how
the o/s could tell that it would actually be safe for me to power off
my computer at home at that particular moment.

Much less which one or ones of "my" computers it was safe to shut down.

But that's stretching things a little - sort of how the lawyers carry on (at
an astronomical fee, of course)


Perhaps there is yet time for you to develop the ultimate file
comparison program...

....to have it classed as a virus, or as spam or as an unsupported
third-party utility (by the most knowledgeable of Office Managers.)


.



Relevant Pages

  • Re: File-Compare "fc" falsely reports mismatch between identical files
    ... first and last lines of each set of differences, whereas /L is said to compare files as ascii text. ... Show me a couple of "text files" that fc/a does not compare properly, and I would argue that they are so extreme in some way that I would not consider them "text files". ... One of the definitions found by google is this: "A file that contains characters organized into one or more lines. ... the tax department reacted to a customer's complaint and insisted that the faulty tax calculation be fixed. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: File-Compare "fc" falsely reports mismatch between identical files
    ... The only difference I see in this case is the filename length - what happens if both filenames have the same length, both as 8.3 names and long filenames? ... but perhaps the buffer is shared between the filename and the data read; fine for real-world ASCII but not for binary being interpreted as line-oriented ASCII. ... While this is indeed an interesting observation, it is illogical to insist/assume that a tool designed to compare text files should be able to consistently determine that two identical binary files are identical, because the flip side of that is that it should therefore always be able to determine that two non-identical binary files differ. ... I'd suggest that IDENTICAL input should produce IDENTICAL results, and any inconsistent behaviour indicates an unwarranted assumption has been made - possibly uninitialised variables, and I'd claim that if this behaviour depends on the filenames involved, then that evidence reinforces my suspicions. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... Linkname: c standard - clc-wiki ... being able to compare unrelated pointers, ...
    (comp.lang.c)
  • Re: Versions
    ... CVersionTypeAlpha -- class for alpha comparation ... So make a special check in the Compare methods for this rule. ... Another way is via a mapping, where the CVersionTypeAlpha class converts all ... you'll never get a standard implementation for all cases.. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... The standard form is like this, ... 1108 The sizeof operator ... ... being able to compare unrelated pointers, ... So long as the pointers are of the same type, ...
    (comp.lang.c)