[Python-ideas] Py3 unicode impositions

Steven D'Aprano steve at pearwood.info
Mon Feb 13 15:02:11 CET 2012


Paul Moore wrote:

> Maybe the answer is to have some form of encoding-detection function
> in the standard library. It doesn't have to be 100% accurate, and it
> certainly shouldn't be used anywhere by default, but it would be
> available for people who want to do the right thing without
> over-engineering things totally.

Encoding guessers have their place, but they should only be used by those who 
know what they're getting themselves into.

http://blogs.msdn.com/b/oldnewthing/archive/2004/03/24/95235.aspx
http://blogs.msdn.com/b/oldnewthing/archive/2007/04/17/2158334.aspx

Note that even Raymond Chen makes the classic error of conflating encodings 
(UTF-16) with Unicode.

+0 on providing an encoding guesser, but -1 on making operate by default.



-- 
Steven




More information about the Python-ideas mailing list