equal
deleted
inserted
replaced
91 } |
91 } |
92 |
92 |
93 try: |
93 try: |
94 encoding = environ.get("HGENCODING") |
94 encoding = environ.get("HGENCODING") |
95 if not encoding: |
95 if not encoding: |
96 encoding = locale.getpreferredencoding() or 'ascii' |
96 encoding = locale.getpreferredencoding().encode('ascii') or 'ascii' |
97 encoding = _encodingfixers.get(encoding, lambda: encoding)() |
97 encoding = _encodingfixers.get(encoding, lambda: encoding)() |
98 except locale.Error: |
98 except locale.Error: |
99 encoding = 'ascii' |
99 encoding = 'ascii' |
100 encodingmode = environ.get("HGENCODINGMODE", "strict") |
100 encodingmode = environ.get("HGENCODINGMODE", "strict") |
101 fallbackencoding = 'ISO-8859-1' |
101 fallbackencoding = 'ISO-8859-1' |