Grid Panel How to Change text encoding type...

January 5th, 2009
  • Is there a way to change encoding type of grid panels.. because of my native language some characters cant be recognised by ext-js..
    THX FOR YOUR REPLIES...


  • Setting the content type would be even better:
    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?


  • 1. Did you set the character encoding of the HTML page to UTF-8?
    2. If you are using JSON or XML, did you also set the character encoding to UTF-8 on these?


  • You don't need to handle this in you JSON library. You should set the proper character encoding for the response stream in which you write the JSON data.


  • i have read this thread
    http://extjs.com/forum/showthread.php?t=4323
    i dont understand if my problem is this :S


  • My jsp file :
    <%@ 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">

  • Thx m8 for your reply but this idiot function not working properly :S
    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 :(


  • Hi m8 thx for your reply..
    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 ....







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Grid Panel How to Change text encoding type... , Please add it free.

    Posted in dballastages.com | edit