Author mark.dickinson
Recipients facundobatista, mark.dickinson, motteneder, vstinner, wangchun
Date 2008-12-08.16:23:52
SpamBayes Score 2.25836e-09
Marked as misclassified No
Message-id <1228753434.87.0.205349108689.issue2173@psf.upfronthosting.co.za>
In-reply-to
Content
I think I've traced the 'no output' problem back to the device_encoding 
function in Modules/posixmodule.c.  The problem occurs when this function 
is called to try to get the encoding for stdout.

On my machine, if I do:

LC_CTYPE="UTF-8" ./python.exe

then the nl_langinfo call in device_encoding returns an empty string.  If 
I do

LC_CTYPE="bogus" ./python.exe

then it returns "US-ASCII"

and if I do

LC_CTYPE="en_US.UTF-8" ./python.exe

then it returns "UTF-8".

In the first case (where the encoding is set to ""), any subsequent 
attempts to send anything to stdout result in a LookupError with the 
message "unknown encoding".  But of course, since this exception message 
is itself sent to stdout (or possibly stderr?) the same problem occurs 
again and we just don't see any output.

I don't yet know why this causes the module build to fail, or why exit() 
doesn't work.

I think we should try to get this fixed before 3.0.1.  Any help would be 
welcomed.
History
Date User Action Args
2008-12-08 16:23:55mark.dickinsonsetrecipients: + mark.dickinson, facundobatista, vstinner, motteneder, wangchun
2008-12-08 16:23:54mark.dickinsonsetmessageid: <1228753434.87.0.205349108689.issue2173@psf.upfronthosting.co.za>
2008-12-08 16:23:54mark.dickinsonlinkissue2173 messages
2008-12-08 16:23:52mark.dickinsoncreate