Message373602
(Off topic) There is a very common mistake in this code:
```
with oepn(filepath, 'r') as f:
data = json.load(f)
```
JSON file is encoded in UTF-8. But the default text encoding is locale encoding.
You should do this instead:
```
with oepn(filepath, 'rb') as f:
data = json.load(f)
```
This works for legacy JSON with UTF-16 or UTF-32 (with/without BOM).too. |
|
Date |
User |
Action |
Args |
2020-07-13 13:01:41 | methane | set | recipients:
+ methane, rhettinger, ezio.melotti, serhiy.storchaka, remi.lapeyre, xtreak, ys19991 |
2020-07-13 13:01:41 | methane | set | messageid: <1594645301.32.0.155425086361.issue41284@roundup.psfhosted.org> |
2020-07-13 13:01:41 | methane | link | issue41284 messages |
2020-07-13 13:01:41 | methane | create | |
|