Set encoding to UTF-8 for MacOS X

This commit is contained in:
Cédric Krier committed 2008-08-13 19:22:56 +02:00
1 parent 1aff8d295f
commit 7e35840929
1 file changed
+2
+2
View File
@@ -167,6 +167,8 @@ def setlang(lang=None):
if os.name == 'nt':
lang2 = _LOCALE2WIN32.get(lang, lang)
os.environ['LANG'] = lang
elif os.name == 'mac':
encoding = 'UTF-8'
locale.setlocale(locale.LC_ALL, str(lang2 + '.' + encoding))
except:
logging.getLogger('translate').info(