In Python 2 you need to convert between encoded strings and unicode.