UnicodeEncodeError - a bit out of my element...

erikcw erikwickstrom at gmail.com
Wed Apr 11 11:16:07 EDT 2007


Hi all,

I'm trying to parse an email message, but am running into this
exception.

Traceback (most recent call last):
  File "wa.py", line 336, in ?
    main()
  File "wa.py", line 332, in main
    print out['msg']
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in
position 238: ordinal not in range(128)

How can I decode/encode this string to print to stdout and send again
in another email?  Do I have to know what language the email is in?

Thanks!
Erik




More information about the Python-list mailing list