This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, grahamd
Date 2009-07-17.11:20:09
SpamBayes Score 5.7416144e-10
Marked as misclassified No
Message-id <1247829612.34.0.992382444568.issue6501@psf.upfronthosting.co.za>
In-reply-to
Content
- Apache is not a Console application, so the Windows GetConsoleCP()
function returns zero (and os.device_encoding(1) returns 'cp0').
- pythonw.exe has no console either; but in pythonrun.c, the test
(fileno(stdin) < 0) is true, and the standard streams are all set to None.
- It is probable that Apache has redefined stdin & co, so the previous
test does not work there.

As a workaround, I suggest to set the environment variable
PYTHONIOENCODING before starting Apache, or before the call to
Py_Initialize.
History
Date User Action Args
2009-07-17 11:20:12amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, grahamd
2009-07-17 11:20:12amaury.forgeotdarcsetmessageid: <1247829612.34.0.992382444568.issue6501@psf.upfronthosting.co.za>
2009-07-17 11:20:10amaury.forgeotdarclinkissue6501 messages
2009-07-17 11:20:10amaury.forgeotdarccreate