sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

UTF-16 text files treated as binary files #1633

Open yurikus opened 2 years ago

yurikus commented 2 years ago

Problem description

UTF-16 text files treated as binary files

Preferred solution

Treat UTF-16 text files treated as text

Screenshots image

deathaxe commented 2 years ago

Also noted that issue, already.

themilkman commented 2 years ago

Isn't this (for me also annoying) default behavior of git?

yurikus commented 2 years ago

It may be, but we're looking at a GUI tool here, which should be a bit smarter, IMHO :) Forces me to reach for beyond compare

pcbeard commented 11 months ago

There are various ways to tell git to treat .strings files (which are UTF-16 with BOM encoded) as text files as far as diff is concerned. Our repo has this .gitattributes file at its root:

*.strings diff=utf16

And any changes to .strings files show up as text diffs. However Sublime Merge doesn't seem to know about this setting. There's a discussion of this on stackoverflow.

yurikus commented 11 months ago

In the recent version, unstaged UTF16 files are still treated as binary, however as soon as you stage them, they are diffed properly.

tlindeb commented 11 months ago

In the recent version, unstaged UTF16 files are still treated as binary, however as soon as you stage them, they are diffed properly.

I have just tried this on UTF-16 with BOM (using build 2091), and unfortunately this did not work. Where can we "upvote" the issue?