about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xfilters/syntax-highlighting.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py
index b5d615e..1ca4108 100755
--- a/filters/syntax-highlighting.py
+++ b/filters/syntax-highlighting.py
@@ -21,6 +21,7 @@
 
 
 import sys
+import io
 from pygments import highlight
 from pygments.util import ClassNotFound
 from pygments.lexers import TextLexer
@@ -29,6 +30,8 @@ from pygments.lexers import guess_lexer_for_filename
 from pygments.formatters import HtmlFormatter
 
 
+sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8')
+sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
 data = sys.stdin.read()
 filename = sys.argv[1]
 formatter = HtmlFormatter(style='pastie')
a556cf422871&follow=1'>Switch to exclusively using global ctxLukas Fleischer 2014-01-16auth: have cgit calculate login addressJason A. Donenfeld 2014-01-16auth: lua string comparisons are time invariantJason A. Donenfeld 2014-01-16authentication: use hidden form instead of refererJason A. Donenfeld 2014-01-16auth: add basic authentication filter frameworkJason A. Donenfeld 2014-01-16t0111: Additions and fixesLukas Fleischer 2014-01-16parsing.c: Remove leading space from committerLukas Fleischer