Files are the Same, but Beyond Compare Says They are Different

Plain Text

If two text files look the same but show differences, it's likely there are differences in line endings.  When line endings are different, a binary comparison will show a mismatch even though the actual text is the same.  For instance, Windows puts CR and LF control characters at the end of each line, while Unix uses LF alone.  Files that have been copied or edited on different systems can end up with different line ending styles.  You can use a Hex Compare session or the Text Compare's View | Hex Details to identify byte differences.

BC3 logo BC version 3 or 4

To compare files in the Folder Compare like in the file viewers:

  1. In the Folder Compare, select Session | Session Settings and pick the Comparison tab.
  2. Enable the Compare contents option and make sure Rules-based comparison is enabled.

BC2 logo BC version 2

To compare files in the Folder Viewer like in the File Viewer:

  1. In the Folder Viewer, select Session | Comparison Control.
  2. Enable the Rules-based comparison option.

Microsoft Office

Two Microsoft Office (Word, Excel, PowerPoint) files may look the same, but have different file sizes, or the timestamps may change after viewing the files even though they were not changed.  Microsoft Office includes version and timestamp information in all office file formats.  It also keeps track of the time the file was last accessed.  This results in file size and binary differences even when the visible file has not changed.  The only way to deal with this is to compare the contents of the files using a rules-based comparison.  For BC version 2, add-on rules to compare the text contents of Office documents are on our Additional File Viewer Rules for Beyond Compare 2 page.  For BC versions 3 and 4 on Windows, this support is built-in.

Executables and DLLs

Two executables or dlls may be compiled from identical source, but are marked as different when compared using a binary comparison.  It is likely that your compiler is inserting some sort of time or version information into the dlls that is creating a binary difference even if they appear to be the same.  Most compilers insert information into dlls and exes that make it difficult to make two separate compiles of the same code equal in a binary comparison.

You can quickly verify this by selecting the two files and doing a Compare Contents (binary) operation.

Copyright © 2017 Scooter Software, Inc.