summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSascha Peilicke <saschpe@gmx.de>2013-08-14 17:01:09 +0200
committerSascha Peilicke <saschpe@gmx.de>2013-08-14 17:01:09 +0200
commit58649612430391d9cc4d67ab39e6c8ec26ddf817 (patch)
tree8ad9388b5e707d8d87e0fb87c9634fb43a638627 /doc
parentd62f11d7e149bf8406974093e5254200471d2745 (diff)
downloadnumpy-58649612430391d9cc4d67ab39e6c8ec26ddf817.tar.gz
Explicitly set encoding to UTF-8 in postprocess.py
The default (ascii) encoding breaks: python3.3 postprocess.py html build/html/*.html Traceback (most recent call last): File "postprocess.py", line 59, in <module> main() File "postprocess.py", line 27, in main lines = process_html(fn, f.readlines()) File "/usr/lib64/python3.3/encodings/ascii.py", line 26, in return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in 2309: ordinal not in range(128)
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/postprocess.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/postprocess.py b/doc/postprocess.py
index f0ca22cd5..257f84806 100755
--- a/doc/postprocess.py
+++ b/doc/postprocess.py
@@ -23,7 +23,7 @@ def main():
p.error('unknown mode %s' % mode)
for fn in args:
- f = open(fn, 'r')
+ f = open(fn, 'r', encoding="utf-8")
try:
if mode == 'html':
lines = process_html(fn, f.readlines())
@@ -32,7 +32,7 @@ def main():
finally:
f.close()
- f = open(fn, 'w')
+ f = open(fn, 'w', encoding="utf-8")
f.write("".join(lines))
f.close()