????????java??????????web???????????У??????????????????????????????????????漰?????????????????????????????????????????????????????????????????????Щ????????????????????????ж????????????Щ??????????????????????????????????????java web????е???????????
???????????????form????????????????????????post??get??????
????1??post??????
??????jsp????е?page????У??????pageEncoding??????????jsp?????servlet????????????form??????????????????post??????????????????pageEncoding??????????????????????????????????pageEncoding=”utf-8”????????request.getParameter()?????????????????????????new String(getBytes(“iso-8859-1”)??”utf-8”)????????????????????????????????????????????iso-8859-1????????????????????????????2????????????utf-8????—>iso-8859-1???????????????        utf-8????—>iso-8859-1????—>iso-8859-1????—>utf-8??????????????????????????????????????????????????????????????????request.setCharacterEncoding()???????????????post?????Ч?????????request.getParameter()?????????????????
????2??get????
??????post????????????????pageEncoding?????????get???????????post??????????tomcat??conf?????????server.xml????????????????????Connector????????URIEncoding?????????????????get?????????????????????????get?????Ч????????????post?????
???????????Ajax??????????????????????????URL??????????????get???????????????pageEncoding???????????URIEncoding??????????к????????????????????????????encodeURI?????????????URLDecoder.decode(str??”utf-8”)?????????????????????????????encodeURI??????????utf-8???????????????????utf-8????—>utf-8????—>iso-8859-1????—>utf-8????????????????????????????????????????????????????????????utf-8?????????????????????????????????????????????????utf-8????iso-8859-1?????????κ??????????????????????????????????????????????????????
???????????????????“???”???????????????????б???????????磺
????gbk????—>utf-8????—>utf-8????—>gbk????????????
???????gbk????—>utf-8???????????????????????????????????????????????????????????……