Default encoding for writable streams.

Added a method to change and retrieve the
default encoding for writable streams.

Fixes #7159