Commit e54c6656a2949170d27f9cabb49ed7702da4aefc
1 parent
345a996d
tablestream: temporary bugfix for Unicode replacement character FFFD, that trigg…
…ers an exception when printing to the console on Windows 10
Showing
1 changed file
with
3 additions
and
0 deletions
oletools/thirdparty/tablestream/tablestream.py
| ... | ... | @@ -281,6 +281,9 @@ class TableStream(object): |
| 281 | 281 | """ |
| 282 | 282 | shortcut for self.outfile.write() |
| 283 | 283 | """ |
| 284 | + # TODO temporary bugfix for Unicode replacement character FFFD, that triggers an | |
| 285 | + # exception when printing to the console on Windows 10 (CP850) | |
| 286 | + s = s.replace(u"\uFFFD", '') | |
| 284 | 287 | self.outfile.write(s) |
| 285 | 288 | |
| 286 | 289 | def write_row(self, row, last=False, colors=None): | ... | ... |