Skip to content

Commit 39daeaf

Browse files
Merge 491ca36 into 2c4caa6
2 parents 2c4caa6 + 491ca36 commit 39daeaf

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

source/NVDAObjects/window/winword.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,7 @@ def getMathMl(self, field):
10411041
try:
10421042
return mathType.getMathMl(obj)
10431043
except:
1044+
log.debugWarning("Error fetching math with mathType",exc_info=True)
10441045
raise LookupError("Couldn't get MathML from MathType")
10451046

10461047
class BrowseModeWordDocumentTextInfo(browseMode.BrowseModeDocumentTextInfo,treeInterceptorHandler.RootProxyTextInfo):

source/mathType.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ def getMathMl(oleFormat, runForConversion=True):
3434
finally:
3535
# 1 is OLECLOSE_NOSAVE
3636
lib.MTCloseOleObject(1, mt)
37-
return mathPres.stripExtraneousXml(mathMl.value)
37+
return mathPres.stripExtraneousXml(
38+
mathMl.value.decode('utf8')
39+
)
40+

0 commit comments

Comments
 (0)