re: Java and UTF

From: Daniel R. Kegel (dank@alumni.caltech.edu)
Date: Wed Jul 02 1997 - 10:18:47 EDT


Pierre asks:
> [How do you write UTF strings in Java? I had to code it myself in
> JDK 1.0; has the situation improved in JDK 1.1?]

It looks like there are indeed convenient ways to convert to and
from UTF-8 in JDK 1.1. For instance,

http://java.sun.com/products/jdk/1.1/docs/api/java.io.DataOutput.html#writeUTF(java.lang.String)
http://java.sun.com/products/jdk/1.1/docs/api/java.io.DataInputStream.html#readUTF(java.io.DataInput)

These methods have the disadvantage that they store the length of the
string in front of the string, but hey, ya take what ya can get!
- Dan



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