Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-94

servletRequest encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.0.1-rc2
    • unspecified
    • portal driver
    • None
    • Win 2k, Oracle 9i, JDK-5.0, Tomcat-4.1.31

    Description

      I'm using UTF-8 but requests stays in my local encoding (cp-1251).
      It may be overcome using this:

      private static String CHARSET = "iso-8859-1";

      ................................

      public void init(ServletConfig config) throws ServletException
      {
      super.init(config);
      String charset = config.getInitParameter("charset");
      if(charset != null && charset.length() > 0)

      { CONTENT_TYPE = "text/html; charset=" + charset; CHARSET = charset; }

      ....................
      public void doGet(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws IOException, ServletException
      {
      servletRequest.setCharacterEncoding(CHARSET);
      ..................

      Attachments

        1. Servlet.patch
          1 kB
          Shinsuke Sugaya

        Activity

          People

            Unassigned Unassigned
            dill Denis I. Yudin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: