In _ensure_default_encoding(), make sure the default encoding is normalized.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:29:45 +0000 (06:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:29:45 +0000 (06:29 -0000)
(trunk r12732)

svn path=/main/branches/2.1.6/; revision=12981

pym/portage/__init__.py

index 5e3e70c1a8c165062368afae0afa0c9681763ff9..9e7b7a76d559fc6501dd3608679d86f24dc29b58 100644 (file)
@@ -7599,7 +7599,7 @@ def _ensure_default_encoding():
        """
 
        default_fallback = 'utf_8'
-       default_encoding = sys.getdefaultencoding()
+       default_encoding = sys.getdefaultencoding().lower().replace('-', '_')
        required_encodings = set(['ascii', 'utf_8'])
        required_encodings.add(default_encoding)
        missing_encodings = set()