Fix garbled text for java client