private static String deleteControlChars(String s){ // Control Codes 0 <= 001f and 007f StringBuffer buf = new StringBuffer(); for(int i=0; i<s.length(); i++){ char ch = s.charAt(i); if(ch > 0x1f && ch != 0x7f){ buf.append(ch); } } return buf.toString(); }