How decode url to windows-1251 in python 2.7 and python 3.2?
Example:
a = "пример"
urllib.quote_plus(a)
'%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80' (unicode)
How to make It in windows-1251 (%EF%F0%E8%EC%E5%F0)
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.
Never ever use “international” strings without the ‘u’ prefix. Without it, your “string” is just a chunk of bytes and python has no idea what to do with it. With the prefix, everything’s easy: