Re: trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Adam Funk
On 2015-12-11, Peter Otten wrote: > Adam Funk wrote: >> but with either or both of those, I get the dreaded >> "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position >> 562: ordinal not in range(128)". How can I force the output to be in >> UTF-8 & silently suppress invalid charac

Re: trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Peter Otten
Adam Funk wrote: > I'm fiddling with a program that reads articles in the news spool > using email.parser (standard library) & > email_reply_parser.EmailReplyParser (installed with pip). Reading is > fine, & I don't get any errors writing output extracted from article > bodies *until* I try to su

trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Adam Funk
I'm fiddling with a program that reads articles in the news spool using email.parser (standard library) & email_reply_parser.EmailReplyParser (installed with pip). Reading is fine, & I don't get any errors writing output extracted from article bodies *until* I try to suppress invalid characters.