jsp无法显示中文破折号“——”,总显示为??
replace replaceAll均试过无效
譬如
<%
String content= "破折号——破折号 ";
content=content.replace( '— ', '- ');
content=content.replaceAll( "—— ", "-- ");
%>
均无效!
请大人赐教!
------解决方案--------------------
jsp页面上加入: <%@ page language= "java " pageEncoding= "GBK%>
------解决方案--------------------
StringBuffer a= new StringBuffer( "d——倒萨范德萨 ");
System.out.println(a.replace(a.indexOf( "—— "), 3, "99 "));