pytries / datrie

Fast, efficiently stored Trie for Python. Uses libdatrie.
http://pypi.python.org/pypi/datrie/
GNU Lesser General Public License v2.1
530 stars 88 forks source link

BUGFIX: Decode string based on byteorder of system #85

Open Aniket-Pradhan opened 3 years ago

Aniket-Pradhan commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

mr-c commented 3 years ago

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