##// END OF EJS Templates
encoding: normalize some silly encoding names
Matt Mackall -
r7461:2a67430f 1.1 default
parent child Browse files
Show More
@@ -81,6 +81,8 b' except ImportError:'
81 81 popen3 = os.popen3
82 82
83 83
84 _encodingfixup = {'646': 'ascii', 'ANSI_X3.4-1968': 'ascii'}
85
84 86 try:
85 87 _encoding = os.environ.get("HGENCODING")
86 88 if sys.platform == 'darwin' and not _encoding:
@@ -91,6 +93,7 b' try:'
91 93 _encoding = locale.getlocale()[1]
92 94 if not _encoding:
93 95 _encoding = locale.getpreferredencoding() or 'ascii'
96 _encoding = _encodingfixup.get(_encoding, _encoding)
94 97 except locale.Error:
95 98 _encoding = 'ascii'
96 99 _encodingmode = os.environ.get("HGENCODINGMODE", "strict")
General Comments 0
You need to be logged in to leave comments. Login now