Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-1508

Invalid spacing characters are rendered as spaces

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • None
    • 1.5.7.1
    • General
    • None
    • OSX 10.7.5

    • Severity 3 - Minor

    Description

      A major issue in our company recently involved an accidental inclusion of an invalid character (in this case, Unicode FEFF, the Byte Order Mark) in the middle of a file. Since it was JavaScript, this blew up the file under certain character encodings. In SourceTree (and in FileMerge, for that matter), this character shows up as a simple space (it even messes up the Wiki formatting here...)

       var body = document.getElementsByTagName('body')[0];

      However, in actual git diff, the differ shows the character fully and even outlines it in black:

      + <U+FEFF> var body = document.getElementsByTagName('body')[0];

      Catching this mistake earlier would have saved us significant time and money. Having this change would make us more comfortable with using SourceTree rather than having to double-check every commit with git diff. I'd be fine with leaving tabs, spaces, \r and \n as is, but invisible characters should be shown by the SourceTree differ (or at least offer an option for it).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daniel.orner Daniel Orner
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: