I want to use “Importação de petróleo” in my program.
How can I do that because all encodings give me errors as cannot encode.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you’re confusing the string
__repr__with its__str__:There’s no problem with
\xe7and friends; they are just the encoding representation for those special characters. You can’t avoid them and you shouldn’t need to 🙂A must-to-read link about unicode: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)