diff options
author | Wade Brainerd <wadetb@gmail.com> | 2008-05-27 19:50:28 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2008-05-27 19:50:28 (GMT) |
commit | eedf94eda384ebb413aaa90f7443bdae86db558e (patch) | |
tree | 6d0bb7a6daa80630ab4127b16d2ba687605c64fc | |
parent | e5e84e643838000895e86285bb867763d54c21c7 (diff) |
Encode input to blahtex, better blahtex error reporting.
-rwxr-xr-x | server.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -153,7 +153,7 @@ class WPMathRenderer: #process = subprocess.Popen(('bin/itex2MML', '--inline'), stdin=subprocess.PIPE, stdout=subprocess.PIPE) process = subprocess.Popen(('bin/blahtex', '--mathml', '--texvc-compatible-commands'), stdin=subprocess.PIPE, stdout=subprocess.PIPE) - (mathml, err) = process.communicate(latex) + (mathml, err) = process.communicate(latex.encode('utf8')) if process.returncode is not 0: return "" @@ -167,7 +167,7 @@ class WPMathRenderer: mathml = mathml.replace('markup', 'math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"') dom.unlink() except: - print "BLAHTEX XML PARSING FAILED: '%s'" % mathml + print "BLAHTEX XML PARSING FAILED:\nINPUT: '%s'\nOUTPUT: '%s'" % (latex, mathml) return "" # Straight embedding. Requires parent document to be XHTML. |