
13 Oct
2016
13 Oct
'16
12:07 a.m.
On 12 October 2016 at 22:57, Elliot Gorokhovsky elliot.gorokhovsky@gmail.com wrote:
On Wed, Oct 12, 2016 at 3:51 PM Nathaniel Smith njs@pobox.com wrote:
But this isn't relevant to Python's str, because Python's str never uses UTF-8.
Really? I thought in python 3, strings are all unicode... so what encoding do they use, then?
They are stored internally as arrays of code points, 1-byte (0-255) if all code points fit in that range, otherwise 2-byte or if needed 4 byte. See PEP 393 (https://www.python.org/dev/peps/pep-0393/) for details. Paul