request.setCharacterEncoding(utf-8);
生活随笔
收集整理的這篇文章主要介紹了
request.setCharacterEncoding(utf-8);
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
request.setCharacterEncoding("utf-8");
不加這句話時,從input控件得到值要用new String(request.getParameter("").getBytes("ISO-8859-1"),"utf-8")方法,
而從 a href=""中得到值直接用request.getParameter("")方法;
而加入了這句話后,從input控件得到值直接用request.getParameter("")方法,而從 a href=""中得到值也要用request.getParameter("")方法
轉載于:https://www.cnblogs.com/strive-for-freedom/p/4057618.html
總結
以上是生活随笔為你收集整理的request.setCharacterEncoding(utf-8);的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NullPointerException
- 下一篇: tcpdump -i eth0 -n