5
Python: ISO-8859-1 / latin1'den UTF-8'e dönüştürme
E-posta modülü ile Quoted-printable'dan ISO-8859-1'e kodu çözülmüş bu dizeye sahibim. Bu bana "\ xC4pple" gibi "Äpple" (İsveççe Apple) 'a karşılık gelen dizeler veriyor. Ancak, bu dizeleri UTF-8'e dönüştüremiyorum. >>> apple = "\xC4pple" >>> apple '\xc4pple' >>> apple.encode("UTF-8") Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'ascii' …