Actually, you should use print list[1].encode('latin1', 'ignore')
This will eliminate the exception when a character has no latin1 equivalent. This is simpler than the other alternatives. Martin Katz [EMAIL PROTECTED] wrote: > Hi, > > we had a similar problem with Outlook > try the following: > > print list[1].encode('latin1') > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 11, 2002 2:23 PM > > To: [EMAIL PROTECTED] > > Subject: Unicode > > > > > > Hi All, > > > > I am new in python. > > I found it very usefull, but : > > this string came from an ADO recordset and i cant do anything with it. > > > > >>> list[1] > > u'SCALA 5.1 Logisztika belf\xf6ld' > > >>> print list[1] > > Traceback (most recent call last): > > File "<input>", line 1, in ? > > UnicodeError: ASCII encoding error: ordinal not in range(128) > > > > How can I use it with wxPython ? > > I can't print it, i can't use it to fill up a TreeCtrl ... > > > > Best regards, > > E-Mail: [EMAIL PROTECTED] > > > > > > _______________________________________________ > > ActivePython mailing list > > [EMAIL PROTECTED] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > Other options: > http://listserv.ActiveState.com/mailman/listinfo/ActivePython > _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython