Solr
  1. Solr
  2. SOLR-501

/admin/analysis.jsp does not decode input string as UTF-8 sequence.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: web gui
    • Labels:
      None
    • Environment:

      Tomcat6.0

      Description

      In servlet2.5, we should call HttpRequestServlet.setCharacterEncoding("UTF-8") to get a UTF-8 character sequence via request.getParameter() in JSP.

      1. header.jsp.patch
        0.5 kB
        Hiroaki Kawai
      2. SOLR-501.patch
        2 kB
        Lars Kotthoff

        Activity

        Hide
        Ryan McKinley added a comment -

        Has anyone looked at this? Any reason not to default the jsp pages to UTF-8?

        Show
        Ryan McKinley added a comment - Has anyone looked at this? Any reason not to default the jsp pages to UTF-8?
        Hide
        Yonik Seeley added a comment -

        Any reason not to default the jsp pages to UTF-8?

        We do want to default to UTF8, but we still sort of support Tomcat 5.5 with this release, which is only up to servlet spec 2.4 . The comment suggests this API call suggests this is new for 2.5?

        Show
        Yonik Seeley added a comment - Any reason not to default the jsp pages to UTF-8? We do want to default to UTF8, but we still sort of support Tomcat 5.5 with this release, which is only up to servlet spec 2.4 . The comment suggests this API call suggests this is new for 2.5?
        Hide
        Lars Kotthoff added a comment -

        The method setCharacterEncoding() is also part of the 2.4 servlet spec, I've just tested it successfully with Tomcat 5.5.

        However, if everything is to be passed around as UTF-8, the Content-Type header of the pages should indicate this and the accept-charset of the forms should be set to UTF-8. I've attached a path which makes the necessary changes.

        Show
        Lars Kotthoff added a comment - The method setCharacterEncoding() is also part of the 2.4 servlet spec, I've just tested it successfully with Tomcat 5.5. However, if everything is to be passed around as UTF-8, the Content-Type header of the pages should indicate this and the accept-charset of the forms should be set to UTF-8. I've attached a path which makes the necessary changes.
        Hide
        Yonik Seeley added a comment -

        I reproduced the problem... UTF8 work on Jetty (which nicely defaults to UTF-8) and does not work on Tomcat (on 5.5 at least).

        Show
        Yonik Seeley added a comment - I reproduced the problem... UTF8 work on Jetty (which nicely defaults to UTF-8) and does not work on Tomcat (on 5.5 at least).
        Hide
        Yonik Seeley added a comment -

        I just committed this after testing with jetty & tomcat, firefox & IE.
        Thanks!

        Show
        Yonik Seeley added a comment - I just committed this after testing with jetty & tomcat, firefox & IE. Thanks!

          People

          • Assignee:
            Ryan McKinley
            Reporter:
            Hiroaki Kawai
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development