Mercurial > enso_core
changeset 35:a0a492bc01e8
On win32, calling xml.sax.parseString() with a unicode argument always seemed to work, but now it doesn't, so we're converting unicode text to ascii w/ xml char ref replacement before calling the function.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 24 Feb 2008 12:51:02 -0600 |
parents | b49cdbe98427 |
children | e340384ccd0d |
files | enso/graphics/xmltextlayout.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/enso/graphics/xmltextlayout.py Sun Feb 24 12:42:24 2008 -0600 +++ b/enso/graphics/xmltextlayout.py Sun Feb 24 12:51:02 2008 -0600 @@ -703,5 +703,6 @@ text = text.replace( " ", NON_BREAKING_SPACE ) xmlMarkupHandler = _XmlMarkupHandler( styleRegistry, tagAliases ) + text = text.encode( "ascii", "xmlcharrefreplace" ) xml.sax.parseString( text, xmlMarkupHandler ) return xmlMarkupHandler.document