This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schmir
Recipients schmir
Date 2008-07-31.14:53:43
SpamBayes Score 0.00723875
Marked as misclassified No
Message-id <1217516025.33.0.943431479482.issue3479@psf.upfronthosting.co.za>
In-reply-to
Content
unichr(2**32) results in a unicode string containing a 0 byte:

{{{
~/mwlib.hg/tests/ python                                            
Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> unichr(2**32)
u'\x00'
>>> unichr(2**32+1)
u'\x01'
>>> unichr(2**32+2)
u'\x02'
}}}

2.6 shows the same behaviour.
History
Date User Action Args
2008-07-31 14:53:45schmirsetrecipients: + schmir
2008-07-31 14:53:45schmirsetmessageid: <1217516025.33.0.943431479482.issue3479@psf.upfronthosting.co.za>
2008-07-31 14:53:44schmirlinkissue3479 messages
2008-07-31 14:53:43schmircreate