当前位置: 代码迷 >> Java Web开发 >> jsp的include包含txt文件出现乱码解决思路
  详细解决方案

jsp的include包含txt文件出现乱码解决思路

热度:1347   发布时间:2013-02-25 21:21:36.0
jsp的include包含txt文件出现乱码

<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="top.txt"%>
<p align="center">
 <%out.println("此书出版了,快来看看吧!还有更多的好书等着您呢!");%>
</p>
<%@ include file="bottom.txt"%>

top.txt:
<html>
<head>
<title>网站</title>
</head>
<body>
<p align="center"><b><font size="5网站</font></b></p>

bottom.txt:
<hr>
<p align="center">
<font size="3">@电子工业出版社版权所有 2004-2008</font><br> 
<font size="3">制作人:云</font><br>
<font size="3">联系方式:abc@126.com</font><br>
</body>
</html>



可是我在执行的时候中文全部不能解析了..变成一堆乱码.请各位前辈求助一下呀!!!

------解决方案--------------------------------------------------------
将txt文件另存为utf-8格式
  相关解决方案