▶

Pragmatic Unicode: Python's Unicode Sandwich

Next Day Video · Talk · 36 min · 2012 · YouTube title: Pragmatic Unicode, or, How do I stop the pain?
Why it's here

Commenters point to it as the clearest explanation of Python's bytes versus Unicode model and the Unicode sandwich, which finally makes the confusion click.

What it covers

Ned Batchelder's PyCon 2012 talk gives a quick overview of what Unicode is, then focuses on what a Python programmer needs to handle text correctly. It presents the 'Unicode sandwich' strategy: decode bytes at input, work with Unicode internally, encode at output.