[Python-ideas] Fall back to encoding unicode strings in utf-8 if latin-1 fails in http.client

Steven D'Aprano steve at pearwood.info
Thu Jan 7 07:59:19 EST 2016


On Thu, Jan 07, 2016 at 08:49:55PM +1100, Chris Angelico wrote:

> It makes sense, but I disagree with the suggestion. Having "Latin-1 or
> UTF-8" as the effective default encoding is not a good idea, IMO;

I'm curious what your reasoning is. That seems to be fairly common 
behavious with some email clients, for example I seem to recall that 
Thunderbird will try encoding emails as US-ASCII, if that fails, 
Latin-1, and only send UTF-8 if the other two don't work.

I'm not defending this tactic, but wondering what you have against it.


-- 
Steve


More information about the Python-ideas mailing list