Pragmatic Unicode, or, How do I stop the pain?
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
“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””
“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
talkRuby Conf 12 - Y Not- Adventures in Functional Programming by Jim WeirichConfreaks · 17 HN recommenders · 2013–2026
lectureThe spelled-out intro to neural networks and backpropagation: building microgradAndrej Karpathy · 17 HN recommenders · 2022–2025
talkHow Python was Shaped by leaky Internals, Armin Ronacher, Flask frameworkВидео с мероприятий {speach! · 15 HN recommenders · 2017–2025
talkRailsConf 2014 - All the Little Things by Sandi MetzConfreaks · 15 HN recommenders · 2015–2025
talkWhat the heck is the event loop anyway? | Philip Roberts | JSConf EUJSConf · 16 HN recommenders · 2015–2025
talkHow To Design A Good API and Why it MattersGoogle TechTalks · 12 HN recommenders · 2011–2025
explainerThe Problem with Time & Timezones - ComputerphileComputerphile · 12 HN recommenders · 2014–2026
talkRailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam StephensonConfreaks · 6 HN recommenders · 2017–2020