把iso8859-1轉爲utf-8便可,由於openldap支持utf-8編碼mysql
如代碼: p.setFullName(new String(request.getParameter("fullname").getBytes("ISO8859-1"),"UTF-8"));p.setLastName(new String(request.getParameter("lastname").getBytes("ISO8859-1"),"UTF-8"));sql
servlet 在取的時候也有iso8859-1 ---->utf-8數據庫
mysql 數據庫編碼:gbk2312編碼