Commits

Matt Mackall  committed 2a67430

encoding: normalize some silly encoding names

  • Participants
  • Parent commits 3342e6a
  • Tags 1.1

Comments (0)

Files changed (1)

File mercurial/util.py

     popen3 = os.popen3
 
 
+_encodingfixup = {'646': 'ascii', 'ANSI_X3.4-1968': 'ascii'}
+
 try:
     _encoding = os.environ.get("HGENCODING")
     if sys.platform == 'darwin' and not _encoding:
         _encoding = locale.getlocale()[1]
     if not _encoding:
         _encoding = locale.getpreferredencoding() or 'ascii'
+        _encoding = _encodingfixup.get(_encoding, _encoding)
 except locale.Error:
     _encoding = 'ascii'
 _encodingmode = os.environ.get("HGENCODINGMODE", "strict")