当前位置: 代码迷 >> Java Web开发 >> 请教如何输出?ùé
  详细解决方案

请教如何输出?ùé

热度:9   发布时间:2016-04-17 14:07:55.0
请问怎么输出?ù???é??
如http://localhost:8080/bookstore/list.jsp?booktype=所有书籍
String   booktype= " ";
booktype=request.getParameter( "booktype ");
<%=booktype%> 就输出一堆问号什么的?
请问什么原因?

------解决方案--------------------
String title1 =new String(request.getParameter( "booktype ").getBytes( "ISO-8859-1 "), "gb2312 ");
String title2 =new String(request.getParameter( "booktype ").getBytes( "ISO-8859-1 "), "GBK ");
String title1 =new String(request.getParameter( "booktype ").getBytes( "ISO-8859-1 "), "utf-8 ");
或者
String title1 =new String(request.getParameter( "booktype ").getBytes( "gb2312 "), "utf-8 ");多试几次 看看那个可以取到值
  相关解决方案