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

adds the ability to set the default encoding for writable streams

Fixes #7159