This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, xiang.zhang
Date 2021-04-14.08:11:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618387875.23.0.869209410888.issue43733@roundup.psfhosted.org>
In-reply-to
Content
I googled "netrc UnicodeDecodeError". It is very rare, but I found two cases.

* https://stackoverflow.com/questions/54748450/macos-python-3-netrc-operations-end-up-with-unicodedecodeerror
  This user uses macOS and Python tried UTF-8. But .netrc was not UTF-8.

* https://qiita.com/yuji38kwmt/items/5472c98cb800ccaab093
  This user uses Windows. They write .netrc with UTF-8, but Python used cp932.

---

There are several options:

* Use UTF-8. If user encountered UnicodeDecodeError, user need to change the .netrc encoding.
* Use UTF-8 with "surrogateescape" or "replace" error handler. non-UTF-8 in comments are ignored.
* Use latin-1. non-ASCII characters in comments are ignored.
History
Date User Action Args
2021-04-14 08:11:15methanesetrecipients: + methane, xiang.zhang
2021-04-14 08:11:15methanesetmessageid: <1618387875.23.0.869209410888.issue43733@roundup.psfhosted.org>
2021-04-14 08:11:15methanelinkissue43733 messages
2021-04-14 08:11:14methanecreate