streams: adds the ability to set the default encoding for writable strea...

...ms

Fixes #7159