[quote]Build 2044
Release Date: 10 March 2011
* Diff commands work with UTF-8 files[/quote]
It would be nice if this feature was available for all files.
Do you think that you could make it work for the default encoded file ?
Something like (warning untested dirty code):
try:
b = self.view.substr(sublime.Region(0, self.view.size())).splitlines()
a = codecs.open(fname, "r", "utf-8").read().splitlines()
except UnicodeDecodeError:
try:
a = codecs.open(fname, "r", self.view.settings().get('fallback_encoding').rpartition('(')[2].partition(')')[0]).read().splitlines()
except UnicodeDecodeError:
sublime.status_message("Diff only works with UTF-8 files")
return