Commit 3f59b0e
FIX: Support UTF-8 encoding for JSON files (#1357)
* WIP: add ensure_ascii flage to _write_json
* Revert "WIP: add ensure_ascii flage to _write_json"
This reverts commit 4c47679.
* Dont Force ASCII encoding in _write_json
* TST: Add a test
TIL: That json.loads will always convert unicode. So to test that unicode was properly encoded while writing to disk, I had to had to just read the text on disk without the json module
* DOC: update changelog
* Commit Dan's suggestion
Instead of closing and re-opening the file, rewind the "playhead" to the start of the open file, then use fid.read() as usual
Co-authored-by: Daniel McCloy <[email protected]>
---------
Co-authored-by: Daniel McCloy <[email protected]>
Co-authored-by: Stefan Appelhoff <[email protected]>1 parent 3492fa0 commit 3f59b0e
3 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
390 | 397 | | |
391 | 398 | | |
392 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
0 commit comments