"env" parameter to "popen" won't accept Unicode on Windows -minor Unicode bug

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Tue Jan 15 14:22:22 EST 2008


Brian Smith wrote:
> popen() knows that it is running on Windows, and it knows what
> encoding Windows needs for its environment (it's either UCS2 or
> UTF-16 for most Windows APIs). At least when it receives a unicode
> string, it has enough information to apply the conversion
> automatically, and doing so saves the caller from having to figure
> out what exact encoding is to be used.

So you propose Python should employ a hidden automatism that
automagically guesses the right encoding? Why not leave it
explicitly/consistently and let the user decide? What will happen
if a future Windows changes its encoding? Will we need another
magic routine to tell it apart?

Regards,


Björn

-- 
BOFH excuse #353:

Second-system effect.




More information about the Python-list mailing list