[issue7090] encoding uncode objects greater than FFFF
Ezio Melotti
report at bugs.python.org
Fri Oct 9 11:16:52 CEST 2009
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
If you want to specify codepoints greater than U+FFFF you have to use
u'\Uxxxxxxxx':
>>> x = u'\u10380'
>>> x.encode('utf-8')
'\xe1\x80\xb80'
>>> x[0]
u'\u1038'
>>> x[1]
u'0'
>>> y = u'\U00010380'
>>> y.encode('utf-8')
'\xf0\x90\x8e\x80'
----------
nosy: +ezio.melotti
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7090>
_______________________________________
More information about the Python-bugs-list
mailing list