streams: set default encoding for writable streams

This commit adds the ability to set the default
encoding for writable streams.

Fixes #7159