Gerrit diff Configuration for UTF-16 encoded file.

233 views
Skip to first unread message

Roy Chan

unread,
Jan 12, 2017, 2:07:48 AM1/12/17
to Repo and Gerrit Discussion
Hi,

we have some UTF-16 encoding TEXT file  (file extension dat) *.dat that would want to see the diff on gerrit.

From what i find on internet, gerrit doesn't support diff UTF-16 files. and git diff command will diff UTF-16 files by default as binary.


i can configure git diff command work properly by

in my ~/.gitconfig file.

```
[diff "localizablestrings"]
textconv = "iconv -f utf-16 -t utf-8"
```

and in my git project .gitattributes file

```
*.dat diff=localizablestrings
```

May i know if such workaround can be configured on the gerrit server and make it work?

Cheers,
Roy

David Ostrovsky

unread,
Jan 12, 2017, 3:53:53 AM1/12/17
to Repo and Gerrit Discussion

Am Donnerstag, 12. Januar 2017 08:07:48 UTC+1 schrieb Roy Chan:
Hi,

we have some UTF-16 encoding TEXT file  (file extension dat) *.dat that would want to see the diff on gerrit.


[...]


May i know if such workaround can be configured on the gerrit server and make it work?


This is Gerrit issue tracker: https://bugs.chromium.org/p/gerrit/issues.
This is your query: "utf-16".
This is the answer to all your questions: https://bugs.chromium.org/p/gerrit/issues/detail?id=1468

Status: New => it's open and nobody is working on it, in which case the status would be Started.
Priority: 3 => that basically means we do not care much, but check the wording of priority description: [1].


Reply all
Reply to author
Forward
0 new messages