Iso-8859-1 text decoding in Python
I have been using a web service that returns text in ISO-8859-1 encoding, also known as latin-1. My Python source code declares the unicode encoding to be utf-8.
Converting text string from iso-8859-1 to utf-8 is simple:
#!/usr/bin/env python # -*- coding: utf-8 -*- ... utf8String = latin1String.decode('iso-8859-1') ...