gornostal / Modific

Highlight lines changed since the last commit (supports Git, SVN, Bazaar, Mercurial and TFS) / ST2(3) plugin
614 stars 44 forks source link

Issue when setting fallback_encoding to UTF-8 in user settings #85

Open ghost opened 9 years ago

ghost commented 9 years ago

I am running Sublime Text 3 build 3065 on Windows 7 64 bit.

On a project versionned by SVN, if the option : "fallback_encoding": "UTF-8", is set in the user preferences, modific stop working and I have this error in the console :

Exception in thread Thread-97:
Traceback (most recent call last):
  File "Modific in C:\Users\fpichon\AppData\Roaming\Sublime Text 3\Installed Packages\Modific.sublime-package", line 107, in _make_text_safeish
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 105: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "Modific in C:\Users\fpichon\AppData\Roaming\Sublime Text 3\Installed Packages\Modific.sublime-package", line 179, in run
  File "Modific in C:\Users\fpichon\AppData\Roaming\Sublime Text 3\Installed Packages\Modific.sublime-package", line 109, in _make_text_safeish
LookupError: unknown encoding: 
gornostal commented 9 years ago

I'll see what I can do.

ghost commented 9 years ago

Thanks!

gornostal commented 9 years ago

I took another look at this issue, but unfortunately I didn't find a fix. The only suggestion I can give is to try to set universal_newlines to True in Modific.py on line 171.