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

BUGFIX: Decode string based on byteorder of system #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Aniket-Pradhan
Copy link

Fixes #38

Big-endian machines are unable to decode the UTF-32 encoded strings. The default decoding is for little-endian machines. Therefore, added a simple if condition to identify the type of machine before decoding the string.

@michelmno
Copy link

patch already validated in openSUSE since a while: https://build.opensuse.org/package/view_file/openSUSE:Factory:PowerPC/python-datrie/datrie-bigendian.patch?expand=1

@Aniket-Pradhan
Copy link
Author

Yep, we'll probably use a similar patch for Fedora until the PR is accepted.

@mr-c
Copy link

mr-c commented Nov 4, 2020

I just added this to the Debian package, thanks all!

sarnold added a commit to freepn/datrie that referenced this pull request Nov 16, 2020
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.

UnicodeDecodeError: 'utf32' codec can't decode bytes in position 0-3: code point not in range(0x110000)
3 participants