title: Python's re.sub returns data in wrong encoding from unicode
body: <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; re.sub('\w', '\1', 'абвгдеёжз')
  '\x01\x01\x01\x01\x01\x01\x01\x01\x01'
  </code></pre>
  
  <p>Why does re.sub return data in this format? I want it to return the unaltered string <code>'абвгдеёжз'</code> in this case. Changing the string to <code>u'абвгдеёжз'</code> or passing <code>flags=re.U</code> doesn't do anything.</p>