I’m trying to do this in Python: 'Fi\xc3\xb1a'.decode('utf-8')
I expect the result to be Fiña. But the result is actually: u'Fi\xf1a'
No idea what is going on, some help on this would be much appreciated.
Thanks!
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.
You’re getting the correct result, the Unicode codepoint for
ñis U+00f1. It’s just that Python won’t display the Unicode character directly. Try it in aprintstatement and see what you get.