Ezio Melotti <ezio.melo...@gmail.com> added the comment: The problem is not with ord() but with the stdin encoding used by the windows terminal. If you write a non-ASCII character (e.g. '¥') in the windows terminal with Python 2 without using the u'' prefix, it will be encoded with the encoding specified by sys.stdin.encoding. If this encoding is a single-byte encoding (e.g. cp850) the result for non-ASCII character might be misleading. If you want the correct result use ord(u'—') and ord(u'¥').
---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11833> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com