title: python, and unicode stderr
body: <p>I used an anonymous pipe to capture all stdout,and stderr then print into a richedit, it's ok when i use wsprintf ,but the python using multibyte char that really annoy me. how can I convert all these output to unicode?</p>
  
  <p><strong>UPDATE 2010-01-03:</strong></p>
  
  <p>Thank you for the reply, but it seems the <code>str.encode()</code> only worked with <code>print xxx</code> stuff, if there is an error during the <code>py_runxxx()</code>, my redirected stderr will capture the error message in multibyte string, so is there a way can make python output it's message in unicode way? And there seems to be an available solution in <a href="https://stackoverflow.com/questions/1956142/how-to-redirect-stderr-in-python">this post</a>.</p>
  
  <p>I'll try it later.</p>