ask() writes on output with the right encoding

This commit is contained in:
Romain Bignon 2011-07-14 16:25:44 +02:00
commit 90f9608ffa

View file

@ -389,7 +389,7 @@ class ConsoleApplication(BaseApplication):
else:
line = getpass.getpass(question)
else:
self.stdout.write(question)
self.stdout.write(question.encode(sys.stdout.encoding or locale.getpreferredencoding()))
self.stdout.flush()
line = self.stdin.readline()
if len(line) == 0: