My Whole File is Different

A common occurrence is to find that an entire file is marked as different, even if the text looks identical.  Another is to find that the entire file from a certain point onwards is marked as different.  There are two common reasons for this:

Unterminated Comments or Strings

Depending on the type of file, Beyond Compare may use a grammar-based file format for the comparison.  The grammar may define multi-line elements that are "delimited", requiring a specific match to terminate the element.  If the terminator is missing in one of the files, the rest of the file will be classified as that element type. 

  • You can edit the file so the comment or string literal is properly closed.
  • You can prevent unterminated string literals from affecting multiple lines by setting the Stop at end of line option in the grammar element.
  • You can change file format to <default> or Everything Else to turn off syntax awareness.

Whitespace/End of Line Differences

While both sides of the text may appear the same, the line can still be detected as a difference if the whitespace separating the characters is different.  Use the Show Whitespace toggle in order to show the whitespace characters including line endings.  If a character still shows as a space with Show Whitespace enabled, it is a special character without a graphical representation in the current font.  You can select View | Hex Details to see the hexadecimal value of the character.

Windows, Mac, and Unix all use different line ending characters, so when comparing between formats you can sometimes encounter differences.  By default, line ending characters will be ignored and not counted as a difference.  In a Text Compare's Session Settings dialog, on the Importance tab, there is a Compare line endings option.  If it is enabled, line endings will have the same importance as spaces.  (In BC version 2, it is on the General tab of the File Comparison Rules dialog.)

Copyright © 2023 Scooter Software, Inc.