Java and UTF

From: Daniel R. Kegel (
Date: Wed Jul 02 1997 - 12:30:15 EDT

Pierre wrote:
> I know about these, and, because they also store the length (a binary
>number), they're useless for, say, a Unicode plain-text editor.

No, they're still quite useful; you just have to strip off the
length. Use a memory stream rather than a file stream,
strip off the two extra bytes, and write the buffer to disk. Voila!

I am still looking for better UTF methods in Java- I think the String
class might in fact have a toByteArray() sort of method- but I think
it's fair to say that Java can do UTF, and you can write a UTF-8
plain text editor in it without too much fuss.
- Dan

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:35 EDT