I have recently faced the same thing while developing a Django app
that processes emails too.
But I found a quick fix, unicode() accepts argument, that tells it
what to do when it stumbles upon non-valid character:
email.mail_from = unicode(email['From'], errors = 'ignore')
Possible values for "
On Mon, Sep 7, 2009 at 5:03 AM, Tracy Reed wrote:
> I have a Django app which processes emails. It is often handed emails
> with unicode characters in them. My understanding is that Python and
> Django handle unicode just fine and somewhat transparently. I was,
> however, told that I need to set
Hi Tracy,
less than two months ago, we were trying to use MySQL in our Django
project (because we were not successful with installation of
PostgreSQL adapter for Python psycopg2 on Mac OS X).
We had similar problems as you have, and ugly, but only found,
solution was to add encode (or decode? I
On Mon, Sep 07, 2009 at 02:33:44AM -0700, ray spake thusly:
> We were constantly getting decoding errors so we now use BeautifulSoup
> to tidy the xml up before any processing.
Wish I could implement a solution like that but I am just pulling
times out of emails, not processing (X)HTML. I am amaze
Hi there
We have a app that processes xml from a third party web service.
We were constantly getting decoding errors so we now use BeautifulSoup
to tidy the xml up before any processing.
best wishes
Ray
On 7 Sep, 10:03, Tracy Reed wrote:
> I have a Django app which processes emails. It is of
I have a Django app which processes emails. It is often handed emails
with unicode characters in them. My understanding is that Python and
Django handle unicode just fine and somewhat transparently. I was,
however, told that I need to set my database tables to UTF-8
encoding. I have done this. Yet
6 matches
Mail list logo