Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-14638

Online editor re-encodes file, mangling special characters

    XMLWordPrintable

Details

    Description

      I really like the "edit online" feature for minor changes. But when I was using it recently, I made a very small change but noticed that it changed other parts of the file, parts I did not modify directly.

      Reproduction steps:

      • Create a file with UTF-8 character "±" (hex 0xC2B1) outside of Bitbucket's online editor.
      • Edit it online in Bitbucket and make a change elsewhere in the file.
      • Save it, and the character will be re-encoded as hex 0xB1 which is invalid UTF-8. I assume Bitbucket is treating the file as being in some other encoding. UTF-8 is not an exotic or rare encoding – everywhere I've worked it has been the default, so I would expect Bitbucket to handle it properly.

      I have a public repository where I reproduced the bug. Here is the commit where the unwanted change happened:

      https://bitbucket.org/stephenrosenthal/online-edit-special-characters-test/commits/304ddb158965a489f6675865ca2bff32c3de6d65

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            23caa3a29c23 Stephen Rosenthal
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: