[Tutor] How does len() compute length of a string in UTF-8, 16, and 32?

boB Stepp robertvstepp at gmail.com
Tue Aug 8 23:23:28 EDT 2017


On Mon, Aug 7, 2017 at 10:04 PM, Zachary Ware
<zachary.ware+pytut at gmail.com> wrote:

> Next, take a dive into the wonderful* world of Unicode:
>
> https://nedbatchelder.com/text/unipain.html
> https://www.youtube.com/watch?v=7m5JA3XaZ4k
>
> Hope this helps,

Thanks, Zach, this actually clarifies things considerably.  I just
finished watching both videos.  Ned's made me aware of some
differences in Python 2 that will be very helpful at work if I ever
get into non-ASCII characters, as my lowest Python version there is
2.4.  And I thought that the second video author (Whose name I'd have
to look up the appropriate code points to type it here!) filled in
technical points that Ned alluded to, but did not explicitly cover.
The two together complemented each other nicely.

I was only vaguely aware of the Python 2 surprises until these two
videos gave more detail.


-- 
boB


More information about the Tutor mailing list