Use UTF-8 encoding for std{in,out,err}

This fixes issue #11162.

`File` constructor takes a `QTextCodec *`, codec; but, if codec is `NULL`, then it assumes "binary" mode, which causes non-ASCII characters to be converted to NUL (`\0`) in `File::write`.

This change passes the codec for UTF-8 to the `File` constructor for the `std{in,out,err}` instances, thus opening them in *text mode*.