[issue13759] Python 3.2.2 Mac installer version doesn't accept multibyte character in interactive mode

Ned Deily report at bugs.python.org
Wed Jan 11 10:17:37 CET 2012


Ned Deily <nad at acm.org> added the comment:

I am not familiar with the Japanese input methods available in OS X. But using copy and paste with an US UTF-8 locale, it seems to work.  Perhaps there is a different locale in effect?

Python 3.2.2 (v3.2.2:137e45f15c0b, Sep  3 2011, 17:28:59) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 'あ'
>>> print(x)
あ
>>> print(ord(x))
12354
>>> import unicodedata
>>> unicodedata.name(x)
'HIRAGANA LETTER A'
>>> print('%x' % ord(x))
3042
>>> import locale
>>> locale.getlocale()
('en_US', 'UTF-8')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13759>
_______________________________________


More information about the Python-bugs-list mailing list