Repository navigation
Commit beffc9e
Read GeoJson files as UTF-8 regardless of locale (#2331)
GeoJson(filename) opened the file in text mode without an encoding, so
it was decoded with the locale encoding. On Windows that garbles or
fails on non-ASCII properties (the bundled kuntarajat.geojson raises
UnicodeDecodeError under cp932). Read the file as bytes and let json
detect the encoding, which also accepts a UTF-8 BOM.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 5295920 commit beffc9e
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
760 | | - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
761 | 763 | | |
762 | 764 | | |
763 | 765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
293 | 311 | | |
294 | 312 | | |
295 | 313 | | |
| |||
0 commit comments