str -> bytes in HTMLStringO._write