On Wed, Jan 27, 2021 at 11:36 PM Inada Naoki <songofaca...@gmail.com> wrote:
> * UnicodeDecodeError is raised when trying to open a text file written in > UTF-8, such as JSON. > * UnicodeEncodeError is raised when trying to save text data retrieved > from the web, etc. > * User run `pip install` and `setup.py` reads README.md or LICENSE file > written in UTF-8 without `encoding="UTF-8"` > > Users can use UTF-8 mode to solve these problems. > They can use it to solve *those* problems, but probably at the cost of creating different problems. There's a selection bias here, because you aren't seeing cases where a script worked because the default encoding was the correct one. If you switch a lot of ordinary users (not power users who already use it) to UTF-8 mode, I think a lot of scripts that currently work will start failing, or worse, silently producing bogus output that won't be understood by a downstream tool. I'm not convinced this wouldn't be a bigger problem than the problem you're trying to solve. * Put a checkbox in the installer? > I'm pretty Unicode-savvy, but even I would have no idea whether to check that box. Do I wish that everything was UTF-8? Yes. Do I want Python to assume that everything is UTF-8? Probably not.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/CKJJKXB6JVOC5SG3OYLXUW2PEWS36Q5E/ Code of Conduct: http://python.org/psf/codeofconduct/