email-gravatar.py: fix UTF-8
这个提交包含在:
父节点
50287e7912
当前提交
46176eca7f
@ -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()
|
||||
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户