title: Urlencode cyrillic characters in Python
body: <p>I need to convert a cyrillic string to its urlencoded version in Windows-1251 encoding. For the following example string:</p>
  
  <blockquote>
    <p>Моцарт</p>
  </blockquote>
  
  <p>The correct result should be:</p>
  
  <blockquote>
    <p>%CC%EE%F6%E0%F0%F2</p>
  </blockquote>
  
  <p>In PHP, I would simply do the following:</p>
  
  <pre><code>$request = urlencode(iconv("UTF-8", "windows-1251", "Моцарт"));
  echo $request;
  </code></pre>
  
  <p>How to accomplish the same goal in Python?</p>