Inada Naoki <songofaca...@gmail.com> added the comment:

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.

----------

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

Reply via email to