neocgit

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

commit 46176eca7f130a59813d160415a5ead58133f128
parent 50287e7912129881a0157e4ae6dcc42310567c6e
Author: Christian Hesse <mail@eworm.de>
Date:   Tue, 14 Jan 2014 11:11:23 +0100

email-gravatar.py: fix UTF-8

Diffstat:
Mfilters/email-gravatar.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/filters/email-gravatar.py b/filters/email-gravatar.py @@ -20,6 +20,7 @@ import sys import hashlib +import codecs email = sys.argv[1].lower().strip() if email[0] == '<': @@ -29,6 +30,9 @@ if email[-1] == '>': page = sys.argv[2] +sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach()) +sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) + md5 = hashlib.md5(email.encode()).hexdigest() text = sys.stdin.read().strip()