title: How to change the stdin and stdout encoding on Python 2
body: <p>I'm using Windows and Linux machines for the same project. The default encoding for stdin on Windows is cp1252, and on Linux it is utf-8.</p>
  
  <p>I would like to change everything to utf-8.
  Is it possible? How can I do it?</p>
  
  <p>This question is about Python 2; for Python 3, see <a href="https://stackoverflow.com/questions/16549332/python-3-how-to-specify-stdin-encoding">Python 3: How to specify stdin encoding</a></p>