[issue1521] string.decode() fails on long strings

Andreas Eisele report at bugs.python.org
Thu Nov 29 17:15:22 CET 2007


Andreas Eisele added the comment:

For instance:

Python 2.5.1 (r251:54863, Aug 30 2007, 16:15:51) 
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
__[1] >>> s=" "*int(5E9)
6.050000 sec
__[1] >>> u=s.decode("utf-8")
4.710000 sec
__[1] >>> len(u) 
705032704
__[2] >>> len(s)
5000000000
__[3] >>> 

I would have expected both lengths to be 5E9

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1521>
__________________________________


More information about the Python-bugs-list mailing list