-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 3.2.2
-
Component/s: Git
-
None
-
Severity 2 - Major
Files encoded with UTF-16 LE (little endian) without BOM (Byte Order Mark) does not display correctly. Every other character is displayed as a space (see screenshot).
To reproduce:
- Save a text file as "sample.txt" in a git repository with encoding of UTF-16LE (without BOM)
- To do this I use the SublimeText3 "Save with encoding" feature
- Add the line
**/*sample.txt text working-tree-encoding=UTF-16LE
to the ".gitattributes" file which should let Git understand how to interpret the file. (this should make it show up correctly)
- Look at the file in the diff view in source tree (see screenshot)
Screenshot:
![]()
To verify fix:
- make sure that the diff view now works with files that are encoded with BOTH of the following encodings:
- UTF-16 LE (without BOM)
- UTF-16 LE BOM (WITH BOM)