fix: add explicit UTF-8 encoding to file operations - #111
Open
Pawansingh3889 wants to merge 2 commits into
Open
Conversation
On Windows, open() without encoding defaults to the system locale (e.g. cp1252), which crashes on paths or content with accented characters like é. This affects GPX files with French/German place names and SVG icons. Changes: - gpx_io.py: add encoding='utf-8' to GPX file read - simplify_gpx.py: add encoding='utf-8' to GPX file write - header.py: add encoding='utf-8' to SVG file read - elevation_map.py: ensure cache path passed as str to rasterio Ref ThomasParistech#99
Author
|
Closing this as I tidy up my open PRs and refocus my contributions. Happy for anyone to pick it up if it's useful. Thanks! |
Owner
|
@Pawansingh3889 Sorry I was busy and didn't notice your PR, I'll have a look |
The prior run's ruff_mypy_pytest failure was https://overpass-api.de rate-limiting the test suite's live OSM downloads (429), unrelated to this PR's actual change. Confirmed locally: ruff, mypy, and pytest all pass (9 failures reproduced independently, all the same 429 on overpass-api.de, across every affected test). Empty commit to get a fresh CI run rather than fight a months-old, expired run log.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, open() without encoding defaults to the system locale (e.g. cp1252), which crashes on paths or content with accented characters like é. This affects GPX files with French/German place names and SVG icons.
Changes:
Ref #99
Description
Corresponding Github Issues / Pull Requests
Proof of Functionality
Provide evidence that the changes work as intended. Include screenshots, logs, or other relevant output.
Warning