Changeset 6905d6f0f6d9…
Parent 589f51dc2f10…
by
Changes to one file · Browse files at 6905d6f0f6d9 Showing diff from parent 589f51dc2f10 Diff from another changeset...
@@ -182,7 +182,11 @@ except StopIteration:
return False
- lines = unicode(txt, 'latin-1', 'replace').splitlines()
+ try:
+ utxt = unicode(txt, util._encoding, 'strict')
+ except UnicodeDecodeError:
+ utxt = unicode(txt, util._fallbackencoding, 'replace')
+ lines = utxt.splitlines()
eob = buf.get_end_iter()
offset = eob.get_offset()
fileoffs, tags, lines, statmax = self.prepare_diff(lines, offset, file)
|
Loading...