Commits

Yuya Nishihara committed de43ef2

chunks: honor file encoding when displaying diffs (fixes #3660)

Comments (0)

Files changed (1)

tortoisehg/hgqt/chunks.py

             chunk.selected = False
             chunk.write(buf)
             chunk.lines = buf.getvalue().splitlines()
-            utext += [hglib.tounicode(l) for l in chunk.lines]
+            utext += [l.decode(fd.textEncoding(), 'replace')
+                      for l in chunk.lines]
             utext.append('')
         self.sci.setText(u'\n'.join(utext))