0 Replies Latest reply on Mar 26, 2009 5:31 AM by gonso75

    newbie encoding question

    gonso75

      Hi All

      Im doing my first project with JBoss a server and Im having quite some problems displaying special characters such as the stress marks we use in Spanish (or French) á é à ó ú.

      This is what I have in my code:

      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       response.setCharacterEncoding("iso-8859-1");
       response.setContentType("text/html; charset=iso-8859-1");
      


      But the page (when clicking view sourcecode) shows this:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      


      Any tips on what Im doing wrong?

      Thanks!