Uploaded image for project: 'Click'
  1. Click
  2. CLK-56

Encoding problem of click and click-examples.war

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core, examples
    • Labels:
      None
    • Environment:
      Click 0.17

      Description

      Click has localized messages, but click-examples doesn't support charset encoding.
      So multi-byte characters messages are not displayed well, and also we can't input
      multi-byte characters.

      I think click-example should use UTF-8 encoding. And DateField (jsCalendar),
      Context has similar problem.

      • Page#getContentType() should return "text/html; charset=UTF-8".
        Or this return value should be configured by configuration files.
      • WEB-INF/velocity.properties should have following entries:
        input.encoding=UTF-8
        output.encoding=UTF-8
      • Should provide some methods to set request charset encoding as UTF-8.
        For examples, we can use SetCharsetEncodingFilter which is included in Tomcat.
      • calendar-xx.js should become UTF-8. Now, some js files are not UTF-8.
      • DateField#getHtmlImports() should return
        ...
        <script type="text/javascript" src=" {0}

        /click/calendar/calendar-

        {2}

        .js" charset="UTF-8"></script>

      • In the multipart request, Form#getRequestParameter() uses FileItem#getString().
        However this method uses the platform default charset encoding.
        Click should use FileItem#getString(request.getCharacterEncoding()).

      Anyway, this is all input and output encoding should be UTF-8.

      Especially, I think you should fix Form#getRequestParameter() because Click can't
      handle multi-byte chars in the multi-part form now. The priority of other problems might be low,
      we can solve them by configurations or other ways.

      Regards.

        Attachments

          Activity

            People

            • Assignee:
              takezoe Naoki Takezoe
              Reporter:
              takezoe Naoki Takezoe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: