Steve Dower <steve.do...@python.org> added the comment:

> If you want to force the usage of UTF-8, you can opt-in for UTF-8 mode: call 
> putenv("PYTHONUTF8=1") before Py_UnixMain() for example.

I'm not talking about forcing UTF-8, I'm talking about *assuming* it (and 
letting "someone else" worry about forcing it).

As I understand it UTF-8 mode, is about overriding the environment's apparent 
encoding and saying "skip our detection logic and always encode/decode via 
UTF-8". That is part of the encoding detection logic.

Our embedding APIs currently accept "whatever" and try to figure out the 
encoding on the inside. I'm proposing that they should accept "UTF-8" and the 
caller has to figure out the encoding (maybe with our helper functions).

That way embedders can just worry about UTF-8 consistently, instead of having 
to work around our workarounds for encoding detection.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36204>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to