[issue32223] distutils doesn't correctly read UTF-8 content from config files
Jan Vlcinsky
report at bugs.python.org
Thu Jan 25 08:43:29 EST 2018
Jan Vlcinsky <jan.vlcinsky at tamtamresearch.com> added the comment:
The fix shall go to
https://github.com/python/cpython/blob/2812d3d99287c50bab99625d7240bcf1c2e32369/Lib/distutils/dist.py#L406
where `parser.read(filename)`
shall be changed to `parser.read(filename, encoding="utf-8")`
This assumes that the setup.cfg shall be UTF-8 encoded what I thing is correct assumption.
Alternative assumptions are (and I do not find them good):
- assume the file is encoded as current console is (this is not deterministic and is direct cause of this issue)
- let user to specify the encoding somewhere around (this requires extra step and does not bring any value)
----------
nosy: +vlcinsky
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32223>
_______________________________________
More information about the Python-bugs-list
mailing list