hackertube.io

Pragmatic Unicode, or, How do I stop the pain?

Next Day Video · talk · Watch on YouTube

What it is

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.

Why Hacker News recommends it

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.

  • 2 people recommended it
  • 2 different months
  • 1 strong recommendations
  • first 2015, last 2019

What HN commenters said

  1. “After A TON OF PAIN I decided to put the time in to watch the talk”

    Made Python strings and the unicode sandwich click after much pain.

    jteppinette, 2019-05 · Strong recommendation · in ““Python's batteries are leaking””

  2. “Ned Batchelder gave an excellent talk[1] that explains how the Python 3 approach to Unicode works.”

    Explains how Python 3 handles Unicode by decoding explicitly at input.

    ptx, 2015-01 · Recommendation · in “Why Perl Didn't Win”

Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.

Topics: unicode, python, text encoding, bytes vs str, unicode sandwich

Also recommended by the same people