neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit b6da53dd75a662f9a72163bc0f7052b5aa0d8d19
parent 4f6fb32f5881a093be4c2f41c72813b80404c569
Author: Přemysl Janouch <p.janouch@gmail.com>
Date:   Wed, 11 Sep 2013 20:10:12 +0200

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>

Diffstat:
Mfilters/syntax-highlighting.py | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git 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])