Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 123cbd2 commit 3550dd3Copy full SHA for 3550dd3
1 file changed
Lib/sre_compile.py
@@ -8,7 +8,7 @@
8
# See the sre.py file for information on usage and redistribution.
9
#
10
11
-import _sre
+import _sre,sys
12
13
from sre_constants import *
14
@@ -281,7 +281,10 @@ def _optimize_unicode(charset, fixup):
281
header = [block]
282
assert MAXCODE == 65535
283
for i in range(128):
284
- header.append(mapping[2*i]+256*mapping[2*i+1])
+ if sys.byteorder == 'big':
285
+ header.append(256*mapping[2*i]+mapping[2*i+1])
286
+ else:
287
+ header.append(mapping[2*i]+256*mapping[2*i+1])
288
data[0:0] = header
289
return [(BIGCHARSET, data)]
290
0 commit comments