From: <am...@us...> - 2010-04-16 18:13:01
|
Revision: 7028 http://jython.svn.sourceforge.net/jython/?rev=7028&view=rev Author: amak Date: 2010-04-16 18:12:55 +0000 (Fri, 16 Apr 2010) Log Message: ----------- Fix for bug 1488: sax JyInputSourceWrapper does not support unicode strings Thanks to Arthur Noel for the report and fix. Modified Paths: -------------- trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py Modified: trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py =================================================================== --- trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py 2010-04-16 17:37:44 UTC (rev 7027) +++ trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py 2010-04-16 18:12:55 UTC (rev 7028) @@ -63,7 +63,7 @@ class JyInputSourceWrapper(javasax.InputSource): def __init__(self, source): - if isinstance(source, str): + if isinstance(source, basestring): javasax.InputSource.__init__(self, source) elif hasattr(source, "read"):#file like object f = source @@ -212,6 +212,7 @@ self._cont_handler.processingInstruction(target, data) def comment(self, char, start, len): + print "Content handler is %s" % self._cont_handler.__class__ self._cont_handler.comment(unicode(String(char, start, len))) class AttributesImpl: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |