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

Add an option encoding_errors to readshapefile #554

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

guziy
Copy link
Contributor

@guziy guziy commented Sep 1, 2022

  • to be able to ignore encoding errors
  • default is strict

addresses #552

to be able to ignore encoding errors
default is strict
@molinav
Copy link
Member

molinav commented Sep 1, 2022

It should be harmless to merge this feature, since it adds a new argument and defaults to the former behaviour, right?

So far it looks good to me. Being a "new feature", I would then bump the basemap version to 1.4.0 soon. But before that I had in mind to fix some of the remaining bugs in the 1.3.x series, just that I didn't find a free spot in my calendar to do it.

@guziy
Copy link
Contributor Author

guziy commented Sep 1, 2022

Thanks @molinav: Yes to your question, this simply adds a new argument with the default value strict which is the current default in pyshp. To avoid the trouble of searching for the right encoding for those who don't need actual strings from the .dbf, they could just set encoding_errors="ignore".

Related question on stackoverflow: https://stackoverflow.com/questions/42103455/utf-8-codec-cant-decode-when-using-readshapefile-on-python-basemap/59262192#59262192

@molinav molinav merged commit c7e36cc into matplotlib:develop Sep 1, 2022
@molinav
Copy link
Member

molinav commented Sep 1, 2022

Thanks for the contribution and the feedback, @guziy!

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

Successfully merging this pull request may close these issues.

2 participants