diff options
| author | Georg Brandl <georg@python.org> | 2008-12-15 11:35:27 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2008-12-15 11:35:27 +0100 |
| commit | 40b04a4ba7718c55d6882b50762d0c7442e30b5d (patch) | |
| tree | 82c31912dd716669b3749f53e3b489d9e484ac1b /sphinx/ext | |
| parent | a8d310c0276f9fd0665a49eeff274a8d240a1dae (diff) | |
| download | sphinx-40b04a4ba7718c55d6882b50762d0c7442e30b5d.tar.gz | |
Fix two issues with non-ASCII characters being written to byte streams.
Diffstat (limited to 'sphinx/ext')
| -rw-r--r-- | sphinx/ext/doctest.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py index c09de94f..58a724eb 100644 --- a/sphinx/ext/doctest.py +++ b/sphinx/ext/doctest.py @@ -13,6 +13,7 @@ import re import sys import time +import codecs import StringIO from os import path # circumvent relative import @@ -169,7 +170,8 @@ class DocTestBuilder(Builder): date = time.strftime('%Y-%m-%d %H:%M:%S') - self.outfile = file(path.join(self.outdir, 'output.txt'), 'w') + self.outfile = codecs.open(path.join(self.outdir, 'output.txt'), + 'w', encoding='utf-8') self.outfile.write('''\ Results of doctest builder run on %s ==================================%s |
