Message329498
I tried to create a PR for it, However, I don't know how to handle the code at https://github.com/python/cpython/blob/d4c76d960b/Lib/site.py#L159
So how to check UnicodeDecodeError when we just open the file, I use readlines() but it may use too many memory than before (I'm not sure it's important in this case).
try:
f = open(fullname, "r")
data = f.readlines()
except UnicodeDecodeError:
f = open(fullname, "r", encoding="utf-8")
data = f.readlines() |
|
Date |
User |
Action |
Args |
2018-11-09 06:58:59 | Windson Yang | set | recipients:
+ Windson Yang, paul.moore, jaraco, tim.golden, zach.ware, steve.dower, Valentin Zhao |
2018-11-09 06:58:59 | Windson Yang | set | messageid: <1541746739.22.0.788709270274.issue35131@psf.upfronthosting.co.za> |
2018-11-09 06:58:59 | Windson Yang | link | issue35131 messages |
2018-11-09 06:58:59 | Windson Yang | create | |
|