From e54c6656a2949170d27f9cabb49ed7702da4aefc Mon Sep 17 00:00:00 2001 From: decalage2 Date: Wed, 12 Apr 2017 22:51:41 +0200 Subject: [PATCH] tablestream: temporary bugfix for Unicode replacement character FFFD, that triggers an exception when printing to the console on Windows 10 --- oletools/thirdparty/tablestream/tablestream.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/oletools/thirdparty/tablestream/tablestream.py b/oletools/thirdparty/tablestream/tablestream.py index addf475..3a7df4f 100644 --- a/oletools/thirdparty/tablestream/tablestream.py +++ b/oletools/thirdparty/tablestream/tablestream.py @@ -281,6 +281,9 @@ class TableStream(object): """ shortcut for self.outfile.write() """ + # TODO temporary bugfix for Unicode replacement character FFFD, that triggers an + # exception when printing to the console on Windows 10 (CP850) + s = s.replace(u"\uFFFD", '') self.outfile.write(s) def write_row(self, row, last=False, colors=None): -- libgit2 0.21.4