I get the following string from database:
'23:45 \xe2\x80\x93 23:59'
and the output should look like
'23:45 - 23:59'
How can I decode this? I tried utf-8 decoding but no luck
>>> x.decode("utf-8")
u'23:45 \u2013 23:59'
Thank you
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.
This is completely correct. The interactive python interpreter displaye the
repr()of the string. If you want to see it as a proper string,printit: