cgit

commit b6da53dd75a662f9a72163bc0f7052b5aa0d8d19

Author: Přemysl Janouch <p.janouch@gmail.com>

Fix UTF-8 with syntax-highlighting.py

Previously the script tried to encode output from Pygments with
the ASCII codec, which failed.

Signed-off-by: Přemysl Janouch <p.janouch@gmail.com>

 filters/syntax-highlighting.py | 1 +


diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py
index dcdba034f89d35caf716c9d122ab1b82f0324221..72d9097160e0bf69e853f98ad084b77322a906ec 100755
--- a/filters/syntax-highlighting.py
+++ b/filters/syntax-highlighting.py
@@ -25,6 +25,7 @@ from pygments import highlight
 from pygments.formatters import HtmlFormatter
 
 sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach())
+sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
 doc = sys.stdin.read()
 try:
 	lexer = get_lexer_for_filename(sys.argv[1])