Fix UTF-8 for old (deprecated) Writers
(Based on 1.6.2.)
- Do not truncate output at embedded zeroes.
This was already fixed the new StreamWriter, which is used by the default stream inserter. This fix will not break anything that wasn't already broken.