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

encoding for items with diacritics #11

Open
cherveny opened this issue Jun 20, 2018 · 0 comments
Open

encoding for items with diacritics #11

cherveny opened this issue Jun 20, 2018 · 0 comments

Comments

@cherveny
Copy link

FYI, was getting the following error when dealing with an item with an Author name that had a diacritic.

UnicodeEncodeError: 'latin-1' codec can't encode character '\u0301' in position 377: Body ('́') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.

Was able to get the item without issue, but making a change to the barcode then putting the item led to the error. I edited put_item to have data become data.encode('utf-8') and all worked well.

May want to consider an encoding parameter (besides xml and json) for this type of pass in too.

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