equal
deleted
inserted
replaced
50 args = tuple(newargs) |
50 args = tuple(newargs) |
51 ret = format % args |
51 ret = format % args |
52 return ret.encode('utf-8', 'surrogateescape') |
52 return ret.encode('utf-8', 'surrogateescape') |
53 builtins.bytesformatter = bytesformatter |
53 builtins.bytesformatter = bytesformatter |
54 |
54 |
55 # Create bytes equivalents for os.environ values |
|
56 for key in list(os.environ.keys()): |
|
57 # UTF-8 is fine for us |
|
58 bkey = key.encode('utf-8', 'surrogateescape') |
|
59 bvalue = os.environ[key].encode('utf-8', 'surrogateescape') |
|
60 os.environ[bkey] = bvalue |
|
61 |
|
62 origord = builtins.ord |
55 origord = builtins.ord |
63 def fakeord(char): |
56 def fakeord(char): |
64 if isinstance(char, int): |
57 if isinstance(char, int): |
65 return char |
58 return char |
66 return origord(char) |
59 return origord(char) |