Forced re-encoding of text to UTF-8, to avoid issues on Windows
authorJoao Rodrigues <j.p.g.l.m.rodrigues@gmail.com>
Tue, 3 Dec 2019 23:19:44 +0000 (17:19 -0600)
committerJoao Rodrigues <j.p.g.l.m.rodrigues@gmail.com>
Tue, 3 Dec 2019 23:19:44 +0000 (17:19 -0600)
bin/util.py

index f9dc12f3f612cddc4a2d7eaac727e7940ba329bd..084d5f46cbf8d8997de8b18b67de970a15db61ce 100644 (file)
@@ -118,6 +118,7 @@ def read_markdown(parser, path):
     cmd = 'ruby {0}'.format(parser)
     p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE,
               close_fds=True, universal_newlines=True)
+    body = str(body.encode('utf-8'))
     stdout_data, stderr_data = p.communicate(body)
     doc = json.loads(stdout_data)