Kaydet (Commit) 89b68f68 authored tarafından Michael Stahl's avatar Michael Stahl

gdb: don't barf on non-ASCII text in SwTxtNode

Because the default text encoding in Python 2 is "ascii" these would
throw a UnicodeEncodeError: 'ascii' codec can't encode character...
üst bc95b990
...@@ -100,7 +100,7 @@ class BigPtrArrayPrinter(object): ...@@ -100,7 +100,7 @@ class BigPtrArrayPrinter(object):
# accessing this is completely non-obvious... # accessing this is completely non-obvious...
# also, node.dynamic_cast(node.dynamic_type) is null? # also, node.dynamic_cast(node.dynamic_type) is null?
value = " TextNode " + \ value = " TextNode " + \
str(node.cast(node.dynamic_type).dereference()['m_Text']) unicode(node.cast(node.dynamic_type).dereference()['m_Text'])
elif str(node.dynamic_type.target()) == "SwOLENode": elif str(node.dynamic_type.target()) == "SwOLENode":
value = " OLENode " value = " OLENode "
elif str(node.dynamic_type.target()) == "SwGrfNode": elif str(node.dynamic_type.target()) == "SwGrfNode":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment