Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2008-05-27 19:50:28 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2008-05-27 19:50:28 (GMT)
commiteedf94eda384ebb413aaa90f7443bdae86db558e (patch)
tree6d0bb7a6daa80630ab4127b16d2ba687605c64fc
parente5e84e643838000895e86285bb867763d54c21c7 (diff)
Encode input to blahtex, better blahtex error reporting.
-rwxr-xr-xserver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.py b/server.py
index 163ef54..9954da9 100755
--- a/server.py
+++ b/server.py
@@ -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.