output utf-8 octets, not wide characters
add some documentation