Grid Panel How to Change text encoding type...
January 5th, 2009THX FOR YOUR REPLIES...
response.setContentType("application/json;charset=UTF-8");
ps. Did you check with Firefox if both your HTML page and your JSON response is UTF-8?
2. If you are using JSON or XML, did you also set the character encoding to UTF-8 on these?
http://extjs.com/forum/showthread.php?t=4323
i dont understand if my problem is this :S
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="html" uri="/WEB-INF/tld/struts-html.tld"%>
<%@taglib prefix="bean" uri="/WEB-INF/tld/struts-bean.tld"%>
<%@taglib prefix="logic" uri="/WEB-INF/tld/struts-logic.tld"%>
style="height : 500"> http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletResponse.html#setCharacterEncoding(java.lan g.String) (http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/ServletResponse.html#setCharacterEncoding%28java.l ang.String%29) this is the explaination of the function but it is useless nothing happens... the source of the problem may be my language settings of windows xp i dont know :S response.setCharacterEncoding("UTF-8");//This is the code :( yes i have changed my encoding to UTF-8 on jsp page (it is default is that) i use jsonobject in my java code but when i wanna pass my jsonobject from servlet to my jsp i see on firebug that my returned response's encoding is not UTF-8. the chars also not recognized in response. but my json library (.jar file) has no encoding function to encode my jsonobject's data ....
Posted in dballastages.com | edit |