Closed yihuajack closed 1 year ago
Interesting, I've never seen this encoding before. It seems like the issue might be related to localization, since gbk is designed for simplified Chinese. If specifying the encoding solves the issue then that seems good.
On Linux, this problem does not exist. On Windows, in
setup.py
,The
read_text()
function should have default value of optional argumentencoding=None
ofutf-8
, but it turns out thatpathlib
usesgbk
:This occurs on
README.md
with line endings ofCRLF
. If the file is saved with endings ofLF
, the position is 700 because two line endings are "\n" instead of "\r\n". The character at that position is "’".Two possible solutions:
read_text(encoding='utf-8')
However, the reason why this error occurs is still unknown.