-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
None
-
2
-
Severity 3 - Minor
-
3
-
Summary
Non-utf8 characters are garbled if file only contains 1 line.
Environment
- v4.14.4
- Verified in Bitbucket Server AMI
Steps to Reproduce
- Activate diff transcoding
- Commit and push 1 line non-utf8 file
- Check the added file gets corrupt
- Deactivate diff transcoding
- Commit and push 1 line non-utf8 file
- Check the added file gets corrupt
I've attached the file non_utf8.zip which is used for verification.
$ find . -type f -name "*.txt" | xargs nkf --guess ./1.1.txt: Shift_JIS (LF) ./1.txt: Shift_JIS (LF) ./2.1.txt: EUC-JP (LF) ./2.txt: EUC-JP (LF) ./3.1.txt: EUC-JP (LF) ./3.txt: EUC-JP (LF)
Expected Results
Source view correctly shows 1 line file as well as multi lines file.
Actual Results
- | 1 line file | Multi lines file |
---|---|---|
Transcode-enabled | Source view Diff to previous |
Source view Diff to previous |
Transcode-disabled | Source view Diff to previous |
Source view Diff to previous |
- Legend:
- Fine
- Corrupt
- Expectedly corrupt cf. https://jira.atlassian.com/browse/BSERV-3179
- Tested encodings
- Shit_JIS
- EUC-JP
Workaround
- None
- relates to
-
BCLOUD-7239 Allow specifying a repository's encoding (for viewing files/diffs) (BB-8418)
- Gathering Interest