[issue6714] memmove fails with unicode strings

2009-08-16 Thread Eric Smith
Changes by Eric Smith : -- resolution: -> invalid stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6714] memmove fails with unicode strings

2009-08-16 Thread Giorgos Verigakis
Giorgos Verigakis added the comment: Yes, you are right. I thought that the different behavior was weird. Sorry this is not a bug. -- status: open -> closed ___ Python tracker _

[issue6714] memmove fails with unicode strings

2009-08-16 Thread Eric Smith
Eric Smith added the comment: What platform is this on? For a ucs4 platform, that is what I'd expect the result to be. Check sys.maxunicode to see if you have a ucs2 or ucs4 build. What do you expect as the result? Remember that memmove takes a count of bytes, not a character count. -

[issue6714] memmove fails with unicode strings

2009-08-16 Thread Giorgos Verigakis
New submission from Giorgos Verigakis : A demonstration: >>> buf = create_string_buffer('__') >>> memmove(buf, 'SPAM', 4) 614584 >>> buf.raw 'SPAM__\x00' >>> buf = create_string_buffer('__') >>> memmove(buf, u'SPAM', 4) 614672 >>> buf.raw 'S\x00\x00\x00__\x00' FWIW memmove fails in Pyt