Fix remove_lines.py script to explicitly read input as cp1252

* The output from sphinx is in cp1252 for CHM builds, which is the only place
  this script is used. Trying to read it as UTF-8 will fail on non-ASCII
  characters.
This commit is contained in:
baldurk
2020-01-08 15:25:03 +00:00
parent b3d9a4a41b
commit 8b851679a8
+5
View File
@@ -7,8 +7,13 @@
# and to remove some extra newlines getting added
import sys
import codecs
def remLines(delim, above, below):
WinReader = codecs.getreader('cp1252')
sys.stdin = WinReader(sys.stdin.buffer)
buff = []
line = sys.stdin.readline()
while line: