[XML-SIG] unicode data

Dave dwallace@delanet.com
Thu, 02 Nov 2000 20:58:49 -0500

I see this in the DOM CharacterData.py  where a few places throw 
exceptions :

if data != None and type(data) != type(''):
     raise DOMException(SYNTAX_ERR)


Martin v. Loewis wrote:

>> Today I upgrade from python 1.5.2 to 2.0.  Needless to say, I'm working
>> thought a few porting issues in my code.  I noticed that after I create a
>> DOM, the string data (attributes, text nodes) are all Unicode instead of
>> strings.  This is causing me a lot of problems, breaking function calls that
>> require strings.  Is there a way to get a Dom with non Unicode strings?
> You'd need to use a driver that produces byte strings. I believe both
> sgmlop and xmlproc will do at the moment (at least until they are
> fixed to produce Unicode).
> Out of curiosity: What specific problems are you encountering?
> Regards,
> Martin
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig