I've read that the Unicode encryption encompasses all other character encrpytions, but why do I get an error when trying this. I know I can decode with Latin but Unicode should be a superset.
'été'.decode('utf-8') I've read that the Unicode encryption encompasses all other character encrpytions, but why do I get an error when trying this. I know I can decode with Latin but Unicode should be a superset.
'été'.decode('utf-8') You need to tell Python the encoding of your source file:
# coding=utf-8 a = 'été'.decode('utf-8') print a See PEP 263 for more details. Here's a relevant snippet:
To define a source code encoding, a magic comment must be placed into the source files either as first or second line in the file