Home  >  Article  >  Web Front-end  >  HTML中文乱码问题_html/css_WEB-ITnose

HTML中文乱码问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:57:231201browse

解决办法:

1.在head节点加入此行标记,把字符声明为UTF-8

<meta http-equiv="Content-Type" content="text/html; charset=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)

         

         

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn