1

I need convert kyrillic

Астрахань

to

%C0%F1%F2%F0%E0%F5%E0%ED%FC

I try to use

urllib.parse.quote_plus()

bit it returns

%D0%90%D1%81%D1%82%D1%80%D0%B0%D1%85%D0%B0%D0%BD%D1%8C

What should I use to convert to another format?

1
  • Does this help? Commented Jun 6, 2018 at 15:20

1 Answer 1

2

I could guess that you are using Windows cp1251 encoding. quote_plus uses by default utf_8, but also support any specific one:

>>> print(urllib.parse.quote_plus('Астрахань', encoding='cp1251'))
%C0%F1%F2%F0%E0%F5%E0%ED%FC
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.