]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Default the encoding of output by the `pybabel --list-locales` command to ASCII with...
authorChristopher Lenz <cmlenz@gmail.com>
Wed, 22 Aug 2007 09:33:47 +0000 (09:33 +0000)
committerChristopher Lenz <cmlenz@gmail.com>
Wed, 22 Aug 2007 09:33:47 +0000 (09:33 +0000)
babel/messages/frontend.py

index deff17d67dfc7fe7cc5e6601487a7afdd6857b4f..60a841c341781c2ce0c5ef35afd75db7e54efc44 100755 (executable)
@@ -631,7 +631,8 @@ class CommandLineInterface(object):
             format = u'%%-%ds %%s' % (longest + 1)
             for identifier in localedata.list():
                 locale = Locale.parse(identifier)
-                print format % (identifier, locale.english_name)
+                output = format % (identifier, locale.english_name)
+                print output.encode(sys.stdout.encoding or 'ascii', 'replace')
             return 0
 
         if not args: