[New-bugs-announce] [issue3479] unichr integer overflow
Ralf Schmitt
report at bugs.python.org
Thu Jul 31 16:53:45 CEST 2008
New submission from Ralf Schmitt <schmir at gmail.com>:
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.
----------
components: Unicode
messages: 70513
nosy: schmir
severity: normal
status: open
title: unichr integer overflow
type: behavior
versions: Python 2.5, Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3479>
_______________________________________
More information about the New-bugs-announce
mailing list