hi
I am using Apache web server and Tomcat 4.1.
I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html
file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8
text is displayed as garbage characters.
I have included following in the JSP
<%@ page contentType="text/html; charset=UTF-8" %>
I have included following in the info.html
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets
displayed correctly.
I suppose, the JSP engine does not interprete the content of the html file correctly
according to its encoding.
Where as if it is a .jsp, then it is int erpreting it appropriately?
Can anybody throw some lite on this?
regards
haresh
////////////////////////////////////////////////////////////////////////////////////
sample files.......
////////////////////////////////////////////////////////////////////////////////////
test1.jsp..........
<%@ page contentType="text/html; charset=UTF-8" %>
<%
response.setContentType("text/html; charset=UTF-8");
%>
<HTML>
<HEAD>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
</HEAD>
<BODY>
<jsp:include page="data1.html" flush="true"/>
</BODY>
</HTML>
////////////////////////////////////////////////////////////////////////////////////
data1.html.....
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<br>
àààà ààààà àà àààà àààà.
<br>