Serhiy Storchaka added the comment:

$ LC_ALL=en_US.iso88591 ./python -c "print('\u20ac')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 
0: ordinal not in range(256)

$ LC_ALL=en_US.iso88591 ./python -c "input('\u20ac')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 
0: ordinal not in range(256)

$ LC_ALL=en_US.iso88591 ./python -c "import getpass; getpass.getpass('\u20ac')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/getpass.py", line 78, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "/home/serhiy/py/cpython/Lib/getpass.py", line 138, in _raw_input
    stream.write(prompt)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 
0: ordinal not in range(256)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to