[issue19846] Python 3 raises Unicode errors with the C locale

Larry Hastings report at bugs.python.org
Mon Dec 9 14:28:57 CET 2013


Larry Hastings added the comment:

> The fact that write() uses sys.getfilesystemencoding() is either
> a defect or a bad design (I leave the decision to you).

I have good news for you.  write() does not cal sys.getfilesystemencoding(), because the encoding is set at the time the file is opened.


> But I'm still missing a reply to my suggestion. As I'm seeing it
> has no disadvantages to give the developer optionally the control.

The programmer has all the control they need.  They can open their own pipes using any encoding they like, and they can even reopen stdin/stdout with a different encoding if they wish.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19846>
_______________________________________


More information about the Python-bugs-list mailing list