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