Author dongying
Recipients dongying, r.david.murray
Date 2010-03-05.06:34:12
SpamBayes Score 0.000253193
Marked as misclassified No
Message-id <1267770855.36.0.293124175355.issue8054@psf.upfronthosting.co.za>
In-reply-to
Content
Hello R. David Murray:

Thanks for your care.

The examples I given both in message and file is just the same. You got the 'UnicodeEncodeError' because your system default encoding is ascii. The declaration of encoding at the top didn't help with this situation.

To solve this, you can add following lines at the import part of the codes.
=====================================================================
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
=====================================================================
Then it should work by executing it directly or in a terminal (but not in IDLE).

You can try the new file I submit. Thanks!
History
Date User Action Args
2010-03-05 06:34:15dongyingsetrecipients: + dongying, r.david.murray
2010-03-05 06:34:15dongyingsetmessageid: <1267770855.36.0.293124175355.issue8054@psf.upfronthosting.co.za>
2010-03-05 06:34:14dongyinglinkissue8054 messages
2010-03-05 06:34:13dongyingcreate