Author ezio.melotti
Recipients amaury.forgeotdarc, bupjae, ezio.melotti, vstinner
Date 2009-02-03.12:26:26
SpamBayes Score 1.29913e-08
Marked as misclassified No
Message-id <>
FWIW, on Python3 it seems to work:
>>> import unicodedata
>>> unicodedata.category("\U00010000")
>>> unicodedata.category("\U00011000")
>>> unicodedata.category(chr(0x10000))
>>> unicodedata.category(chr(0x11000))
>>> ord(chr(0x10000)), 0x10000
(65536, 65536)
>>> ord(chr(0x11000)), 0x11000
(69632, 69632)

I'm using a narrow build too:
>>> import sys
>>> sys.maxunicode
>>> len('\U00010000')
>>> ord('\U00010000')

On Python2 unichr() is supposed to raise a ValueError on a narrow build
if the value is greater than 0xFFFF [1], but if the characters above
0xFFFF can be represented with u"\Uxxxxxxxx" there should be a way to
fix unichr so it can return them. Python3 already does it with chr().

Maybe we should open a new issue for this if it's not present already.

Date User Action Args
2009-02-03 12:26:30ezio.melottisetrecipients: + ezio.melotti, amaury.forgeotdarc, vstinner, bupjae
2009-02-03 12:26:30ezio.melottisetmessageid: <>
2009-02-03 12:26:27ezio.melottilinkissue5127 messages
2009-02-03 12:26:27ezio.melotticreate