Python unicode

June 23, 2015, 12:56 a.m.

Ned Batchelder's Pragmatic Unicode talk has everything a Python programmer needs to know about dealing with unicode.

His unicode sandwich is worth repeating here. Just remember:

str -> decode -> unicode -> encode -> str #python 2
bytes -> decode -> str -> encode -> bytes #python 3