Would be useful to have control over output encoding (ie. generate an octet stream output in UTF8, UTF16BE/LE). Generation of surrogate pairs would also be needed for encodings that support them, since many applications get this wrong (even in Java, the number of java.lang.Characters in a java.lang.String is not necessarily the same as the length of the String...)
You could even add options for "badly behaved" UTF8 (eg. overlong encodings, deliberate sync errors etc.) to stress test the other end.
You could even add options for "badly behaved" UTF8 (eg. overlong encodings, deliberate sync errors etc.) to stress test the other end.