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>
from pygments.formatters import HtmlFormatter
sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach())
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])
doc = sys.stdin.read()
try:
lexer = get_lexer_for_filename(sys.argv[1])