Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readshapefile: add an argument to override unicode decoding error handling #552

Closed
guziy opened this issue Aug 31, 2022 · 0 comments
Closed

Comments

@guziy
Copy link
Contributor

guziy commented Aug 31, 2022

Usually, we want to plot the shapes and not care too much about the correctness of decoded .dbf file. But the current behavior: plotting fails if the default encoding does not match the one used for saving .dbf file.

I propose to add an argument to the readshapefile:

mp.readshapefile(..., encoding_errors="strict") # I guess the possible values are  'ignore', 'replace' and 'backslashreplace'

Currently, this is hardcoded to 'strict' inside the readshapefile method (i.e. default in the Reader constructor).

I could try to submit a PR at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant