From: Aniket Pradhan <aniket17133@iiitd.ac.in>
Date: Wed, 4 Nov 2020 13:53:15 +0530
Subject: Decode string based on byteorder of system
Origin: upstream, https://github.com/pytries/datrie/pull/85
Forwarded: not-needed

--- python-datrie.orig/src/datrie.pyx
+++ python-datrie/src/datrie.pyx
@@ -1120,7 +1120,10 @@
     if length == 0:
         length = cdatrie.alpha_char_strlen(key)*sizeof(cdatrie.AlphaChar)
     cdef char* c_str = <char*> key
-    return c_str[:length].decode('utf_32_le')
+    if sys.byteorder == "little":
+        return c_str[:length].decode('utf_32_le')
+    else:
+        return c_str[:length].decode('utf_32_be')
 
 
 def to_ranges(lst):
