Support diffs of UTF-16 encoded text files
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=16556) </details> <!--IssueSummary end--> ### Summary This is a follow up to gitlab-ce#10745 I created a sample project on gitlab.com that demonstrates this issue, see https://gitlab.com/j-steinblock/utf16-test and added a simple utf-16 file with the content ``` [List description] [Description] Text=Something else FileVersion=10 RootTable=MyTable Units=SCM-Units Metric=3 ``` The file starts with `FF FE 5B 00` (Hex Code) Preview for this file is not possible, see: https://gitlab.com/j-steinblock/utf16-test/blob/master/test.txt (Edit link is missing as well) ![01-file](/uploads/42c38aa3612cce1482c2ef05fd87299d/01-file.PNG) A merge request just shows `no preview for this file type`, see: https://gitlab.com/j-steinblock/utf16-test/merge_requests/1/diffs ![02-merge-request](/uploads/d8ecc2bacc9724471084602e933b7892/02-merge-request.PNG) Same for compare, see: https://gitlab.com/j-steinblock/utf16-test/compare/master...test ![02-merge-request](/uploads/5644b00f56d28e8b65677d1c470a1947/02-merge-request.PNG)
issue