[issue17439] insufficient error message for failed unicode conversion

2013-03-17 Thread R. David Murray
R. David Murray added the comment: No. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue17439] insufficient error message for failed unicode conversion

2013-03-17 Thread anatoly techtonik
anatoly techtonik added the comment: Ok. Does the data (string literals) has a scope? Does Python know at runtime that a string literal stored in its memory was defined in the input stream or a file? -- ___ Python tracker

[issue17439] insufficient error message for failed unicode conversion

2013-03-16 Thread R. David Murray
R. David Murray added the comment: Python doesn't store the encoding information anywhere. The coding cookie is used to correctly convert the bytes in the file into unicode...otherwise they are just treated as bytes. For the stdin case, the encoding is associated with the input stream, and ag

[issue17439] insufficient error message for failed unicode conversion

2013-03-16 Thread anatoly techtonik
New submission from anatoly techtonik: When Python 2.x compares ordinary string with unicode, it tries to convert the former, and shows an error message if the conversion fails. Attached example with Russian strings gives the following: russian.py:11: UnicodeWarning: Unicode equal comparison f