mupchrch / split-diff

Side-by-side file compare for the Atom text editor.
https://atom.io/packages/split-diff
MIT License
200 stars 26 forks source link

Diff is ignoring language grammar code page setting and corrupting some characters when diff from git #163

Open CaptainCapstone opened 5 years ago

CaptainCapstone commented 5 years ago

Using split-diff 1.6.0 Private, in house, language grammar (sets codepage to ISO-8859-1, while Atom is set to use UTF-8) Our language uses the '¬' symbol to designate NOT. When executing split-diff on a file that contains this symbol, the last committed version in git is diffed, but the '¬' symbol becomes '�'. So every line with the NOT symbol shows as a changed line in the compare.

The same corruption of the NOT symbol can be seen if I just change the code page on the original file from 8859-1 to utf-8.

So, I do not know how split-diff determines which code page to use when opening a file from git to compare to, but would it be possible to honor the codepage dictated in the language grammar?

Our language grammar defines this in the in the settings folder, in the language.cson file: 'editor': 'atomicSoftTabs': false 'tabType': "soft" 'tabLength': 2 'preferredLineLength': 72 'softWrap': false 'showInvisibles': false 'core': 'fileEncoding': "iso88591" 'whitespace': 'removeTrailingWhitespace': false

codepage_settings compare_error