Writes string as length-prefixed UTF-8: a big-endian 32-bit byte count followed by the UTF-8 payload (same layout as readUtf8).