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

Non-alphanumeric characters display incorrectly in raw commit

XMLWordPrintable

      Issue Summary

      A user has raised an issue wherein they have used Chinese characters in a commit, this displays correctly in a diff view but when viewing the raw commit shows incorrectly. The charset used doesn't appear to be correctly defined in the header.

      Steps to Reproduce

      1. Commit a file using non-alphanumeric characters such as characters from a non-English language (in my example this is Chinese Traditional)
      2. View the raw commit, it is shown incorrectly

      Expected Results

      Formatting is correct in both the diff view and raw commit view

      Actual Results

      Formatting is correct in diff view, incorrect in raw commit view
      DIFF VIEW:

      “痛苦本身就是很多痛苦,他喜歡笨手笨腳,迴避任何人都無法支付的痛苦。他們是他們渴望的百葉窗的例外,他們看不到,他們對那些放棄的人有過錯他們的辦公室,那是撫慰心靈的艱辛。”
      

      RAW COMMIT:

      diff --git a/UTFEncodingTest.txt b/UTFEncodingTest.txt
      new file mode 100644
      index 0000000..031d50b
      --- /dev/null
      +++ b/UTFEncodingTest.txt
      @@ -0,0 +1,2 @@
      +
      +“痛苦本身就是很多痛苦,他喜歡笨手笨腳,迴避任何人都無法支付的痛苦。他們是他們渴望的百葉窗的例外,他們看不到,他們對那些放棄的人有過錯他們的辦公室,那是撫慰心靈的艱辛。”
      diff --git a/tester123.txt b/tester123.txt
      new file mode 100644
      index 0000000..e69de29
      diff --git a/testwebhook.txt b/testwebhook.txt
      new file mode 100644
      index 0000000..e69de29
      -- 
      2.32.0
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              57b7f67f3625 Ben
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: