Posted By:
David_Thornton
Posted On:
Tuesday, November 23, 2004 05:24 PM
You probably want to check for the number of bytes not characters as Chinese is a DBCS.
public int getLengthInBytes(String str) {
byte[] numOfbytes = str.getBytes();
return numOfbytes.length;
}