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>
Přemysl Janouch p.janouch@gmail.com
Wed, 11 Sep 2013 20:10:12 +0200
1 files changed,
1 insertions(+),
0 deletions(-)
jump to
M
filters/syntax-highlighting.py
→
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])