Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unicode files diff #750

Closed
shuax opened this issue May 27, 2020 · 3 comments
Closed

Support unicode files diff #750

shuax opened this issue May 27, 2020 · 3 comments

Comments

@shuax
Copy link

shuax commented May 27, 2020

I have some files that are utf16-le with bom encoded.
Now displayed as binary file.

@BenjaminSchaaf
Copy link
Member

Git does not support diffing utf-16 encoded files in it's index. You can however use the working-tree-encoding git attribute to make git convert to utf-8 for storage and back to your desired utf-16 encoding on disk. Sublime Merge doesn't have any special settings for encoding, we simply rely on settings/attributes from git.

@shuax
Copy link
Author

shuax commented May 28, 2020

Thanks for the answer

@shuax shuax closed this as completed May 28, 2020
@zePanzerfaust
Copy link

zePanzerfaust commented Oct 5, 2020

So are you using the actual file and git output like this?

diff --git a/file b/file
index 61ddcd6..80eef3e 160000
--- a/file
+++ b/file
@@ -1 +1 @@

Because I thought all these external diff tools use two temporary files and compare them.
If that's the case there will never be support I guess? Will there be support for external diff tools soon or in the near future? (I'm not interested in all these workarounds in the forum.)

I frequently have to diff UTF16-LE files and it would be nice to have a simple menu option that calls git difftool ... with the correct parameters or something similar. The same applies for a merge. Tracked in #58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants