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>
Este cometimento está contido em:
ascendente
4f6fb32f58
cometimento
b6da53dd75
@ -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])
|
||||
|
Carregando…
Criar uma nova questão referindo esta
Bloquear um utilizador