Question : Comparing text documents (originally HTML docs, but saved to text files)

I'm comparing two text documents with different text flows and embedded hard returns (0x0D 0x0A).

There are numerous sections where file A might read
   The quick brown fox
   jumped over the
   lazy dog
and file B might read
   The quick brown fox jumped
   over the lazy dog.

Converted to a canonical form, these two sentences are identical, but my comparison tool (Beyond Compare) shows differences due to the hard returns.

I could write something to trim the hard returns, but am hoping there is an easier way.  There will be insertions, deletions, and changes between the two files.

Any ideas?  I'm on Windows 7, have Visual Studio 2008, have Beyond Compare.

Answer : Comparing text documents (originally HTML docs, but saved to text files)

I think your going to run into this with every text comparer unless you go to a hex/binary comparison.... White Space can be checked with some programs but its default not to compare hard new lines unless your in hex/binary mode...

If you do go to Hex/Binary mode your going to have problems viewing the data the same way your use to...
Random Solutions  
 
programming4us programming4us