解决办法:
1.在head节点加入此行标记,把字符声明为UTF-8
若是jsp文件,在文件首还需作页面转码引入
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2.如果上述仍然是乱码的话说明你的编辑器字符编码不是UTF-8。eclipse设置字符编码的方法如下:
a.Window->Preferences->General->Workspace 面板Text file encoding 选择UTF-8
b.Window->Preferences->General ->Content Type->Text->JSP 最下面设置为UTF-8(Upload)
c.Window->Preferences->Web->JSP Files 面板选择 ISO 10646/Unicode(UTF-8)
已抢187105个
抢已抢67504个
抢已抢353782个
抢已抢668475个
抢已抢123892个
抢已抢26094个
抢