Fix writing UTF-8 Strings