Peter Otten schrieb:

> encoding = sys.stdout.encoding or "ascii"
> for row in rows:
>     id, address = row[:2]
>     print id, address.encode(encoding, "replace")
> 
> Example:
> 
>>>> u"ähnlich lölich üblich".encode("ascii", "replace")
> '?hnlich l?lich ?blich'

A very good tip, Peter - I've also had this problem before and didn't
know about your solution.

Thanks,
Johannes

-- 
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
         -- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
                         <48d8bf1d$0$7510$54022...@news.sunrise.ch>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to