random832 added the comment:
I can't reproduce without pickle. I did some further digging, though, and it
*looks like*...
1. Pickle causes the built-in UTF-8 representation of a string to be populated,
whereas encode('utf-8') does not. Can anyone think of any other operations that
do this?
2. After the UTF-8 representation of the 2-character string is populated,
concatenating a new character to it does not update or clear it.
3. However, it worked just fine with the 1-character string - concatenating it
caused the UTF-8 representation to be cleared.
The actual operation that creates an inconsistent string is the concatenate
operation, but it only happens with a string that has been "primed" by having
its UTF-8 representation materialized.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25709>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com