> Within a String, the encoding of char values is practically irrelevant. It is a
> hidden encoding that is never exposed to the user...or developer. When you access
> String char values, you use an index to 16-bit Unicode values. To my knowledge,
> Sun does not claim that its internal encoding of String is UTF-8 in any of its API
> documentation.

The internal encoding is exposed by the regrettably named readUTF and
writeUTF methods of java.io.Data{Input,Output}Stream, which should have
been named readString and writeString. People have assumed that they
are general-purpose UTF-8 read/write functions.