Win32com and unicode problems - ordinal not in range(128)

Andrew Markebo andrew.markebo at telelogic.com
Sun Oct 1 16:14:13 EDT 2000


I am messing around with strings returned from the internet explorer
com-object.. 

What happens is.. 
>>> foo.body.innerHTML
u'<CENTER>\015\012<FORM action=http://search.y [...]
>>> print foo.body.innerHTML
Traceback (innermost last):  
        File "<interactive input>", line 1, in ?
        UnicodeError: ASCII encoding error: ordinal not in range(128)

uhmm It seems to barf on "·".. grumble.. how do I convert it to
somehing useful.. either normal 8bit latin1 string.. or well I just
browse such sites at the moment..

        /Andy




More information about the Python-list mailing list