John Cowan <jcowan at reutershealth dot com> wrote: >> A 32-bit length count, followed by an array of N arbitrary Unicode >> characters, would probably be the best implementation today. > > Which is essentially what the Java String class has, if you unwrap it.
Then why do the DataInput and DataOutput interfaces perform this special conversion? There isn't any mention, on the page whose URL Theodore originally provided, of compatibility with C strings. If a Java String consists of a count followed by the data, why would "embedded nulls" in the data make any difference? >> I'd still like to know what practical, real-world TEXT-related >> benefits would derive from allowing U+0000 in strings of TEXT in a C >> program. > > Simplicity and generality. Those are design benefits. I was asking about the ability to represent text adequately. -Doug Ewell Fullerton, California http://users.adelphia.net/~dewell/

