Announcement

Collapse
No announcement yet.

Character set, BOM, and line ending changes hidden

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Character set, BOM, and line ending changes hidden

    I have a file with German text in it that uses the Code Page 1250 character set. I manually converted this file to UTF-8 with Byte-Order-Mark using Notepad++. However, it's very difficult in Beyond Compare to see that there are any differences between the files. It lists the original file as ANSI, and the new file as UTF-8 with BOM, but this info is not very noticeable.

    The only way to see the actual differences is to switch to the hex editor.

    Similarly, if you have inconsistent line endings in a file (DOS and Unix), and then fix the file to have consistent line endings, there is no easy way in Beyond Compare to see the differences. They are completely hidden in the text view.

    Shouldn't these differences show up as unimportant differences in the text editor? The lines of text are different, and the differences can matter.

  • #2
    Hello,

    A difference in encoding is noted in the status bar, but you are correct in that won't update the overall Rules-based comparison status of the files. For that level of scan, you can use a Binary scan or the Hex compare to see if the files are exactly the same. We do also have a Text Compare -> View menu -> Hex Details for quick viewing of hex information in the Text Compare, but this doesn't update the comparison status.

    For line ending differences, we can show and mark these as differences, but don't do so as default. To update this setting, go to the Session menu - Session Settings, Importance tab, and enable "Compare line endings (PC/Mac/Unix)", as well as any other differences you consider important should be Checked items. This can apply for "Use for this view only" or "Also update session defaults" to apply for future views. The View menu -> Show Whitespace toggle will also show the line ending characters on screen, so you can easily see which/where they are different.
    Aaron P Scooter Software

    Comment


    • #3
      Thanks. That line endings setting is extraordinarily useful when doing any work with Xcode 9.x (which completely ignores its own line endings setting).

      I realize that character encodings are a bit of a rabbit hole, but it would be nice if there was a setting that lets you see character set differences inline in a text compare. In some rare instances knowing things like what Unicode Normalization Form (if any) is in use would also be useful.

      Comment


      • #4
        Originally posted by anotherrav View Post
        Thanks. That line endings setting is extraordinarily useful when doing any work with Xcode 9.x (which completely ignores its own line endings setting).
        It's not a huge deal, but the following seems like a bug to me.

        This line endings setting overrides the fact that comments are unimportant. So if you have a multi-line comment, and delete it, all of the comment text will be considered to be unimportant (since it was originally commented out), but the line endings will be treated as being important (even though they were also originally commented out).

        Comment


        • #5
          Hello,

          Thanks for the feedback, although this is intentional behavior. The option to mark aligned lines with different line endings as important is to find where a file would have differences and fix them (orphan lines are not important, unless independently marked). This includes any differences that might have been introduced in a comment section, or even a comment line (since // is defined to end of line, that would swallow it as well if this were changed).
          Aaron P Scooter Software

          Comment

          Working...
          X