Reputation: 639
I have a problem about character encoding
in jsp pages
. Even if i added charset params
to my page, i still have this problem. when I statically add Turkish chars to my jsp page
it is ok, but the text added to the page dynamically by java has charset problem. And i am using webSphere 6
as app server of my app. This is how i added tags,
<%@ page contentType="text/html;charset=ISO-8859-9" %>
<META http-equiv="Content-Type" content="text/html; charset=windows-1254">
For example the code below read related strings from language txt, and try to print it in jsp. all turkish chars encoded wrong , so that is why they appears wrong.
<h2><%=Messages.message("metin1")%>
Upvotes: 0
Views: 1354
Reputation: 2397
request.setCharacterEncoding("ISO-8859-9");
Upvotes: 1
Reputation: 6786
Save the jsp file with utf encoding. Also use
request.setCharacterEncoding("UTF-8");
in servlet.
Upvotes: 0