Re: How to store ASCII encoded python string?

2006-08-28 Thread micahc
Fredrik Lundh wrote: > 3) convert the data to Unicode before passing it to the database > interface, and leave it to the interface to convert it to whatever > encoding your database uses: > > data = ... get encoded string from email ... > text = data.decode("iso-8859-1") > ... write

How to store ASCII encoded python string?

2006-08-28 Thread micahc
I currently have a Python program that reads in emails from a POP3 server. As soon as the message is read in it is fed directly into a PostgreSQL database for storage. Later, it is broken down into it's parts and displayed to the user. My problem is that when I try to pass "\tsome text\xa7some m