Comment 6 for bug 70565

Revision history for this message
John A Meinel (jameinel) wrote :

Is this still a problem, sorry about the delayed response...

This is probably a better patch. If it fixes your problem, we should merge this into bzr.

=== modified file 'bzrlib/ui/text.py'
--- bzrlib/ui/text.py 2006-10-31 01:30:31 +0000
+++ bzrlib/ui/text.py 2007-01-03 21:19:52 +0000
@@ -26,6 +26,7 @@
 import getpass

 from bzrlib import (
+ osutils,
     progress,
     )
 """)
@@ -82,7 +83,8 @@
         :return: The password string, return None if the user
                  canceled the request.
         """
- prompt = (prompt % kwargs).encode(sys.stdout.encoding, 'replace')
+ encoding = osutils.get_terminal_encoding()
+ prompt = (prompt % kwargs).encode(encoding, 'replace')
         prompt += ': '
         # There's currently no way to say 'i decline to enter a password'
         # as opposed to 'my password is empty' -- does it matter?