Comparing text documents (originally HTML docs, but saved to text files)
Posted on 2010-01-01
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
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.