The difference is the default encoding. You can retrieve this via sys.getdefaultencoding()
. You will notice that the default encoding in a Windows 8 shell is ascii
, while PyDev defaults a launch configuration's default encoding to the project's default encoding, which itself defaults to Cp1252
.
There are a few (problematic) tricks to change in the default encoding in code, primarily reload(sys); sys.setdefaultencoding('myencoding')
. Ian Bicking documented this in his blog post The Illusive setdefaultencoding.
If you just want to align the PyDev behavior to what you see in the console (or on your production servers), you can change the default encoding on the 'Common' tab of the launch configuration properties: