Message 167772 - Python tracker
> Victor proposes that it's acceptable to simply disallow changing the encoding of a stream that isn't seekable. It is no what I said. My patch raises an exception if you already started to read stdin. It should work fine if stdin is a pipe but the read buffer is empty.