I have a python program running very well. It connects to several websites and outputs the desired information. Since not all websites are encoded with utf-8, I am requestin
When you run the python script in your terminal, your terminal is likely to be encoded in UTF8 (specially if you are using linux or mac).
When you set l
variable to "some string with latin characters"
, that string will be encoded to the default encoding, if you are using a terminal l
will be UTF8 and the script wont crash.
A little tip: if you have a string encoded in latin1 and you want it in unicode you can do:
variable.decode('latin1')