Character encoding not defined explicitly when serving HTML help files

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      It seems that the character encoding used when serving HTML help files depends
      on the web container (and system environment?) serving them.

      At the moment, this causes non-english help texts to be displayed mangled in the
      GUI.

      These were the values for the HTTP header "Content-Type" in my setups:

      Jetty/Windows: "text/html", i.e. no encoding specified at all.
      Winstone/Windows: "text/html;charset=utf-8"
      Winstone/Linux: "text/html;charset=ISO-8859-1"

      As all HTML files within the Hudson web application are encoded in UTF-8, I
      would suggest to enforce that convention by nailing down the encoding with a
      filter in web.xml like the following?

      [...snip...]

      <filter>
      <filter-name>force-encoding-filter</filter-name>
      <filter-class>hudson.ResponseHeaderFilter</filter-class>
      <init-param>
      <param-name>Content-Type</param-name>
      <param-value>text/html;charset=utf-8</param-value>
      </init-param>
      </filter>

      <filter-mapping>
      <filter-name>force-encoding-filter</filter-name>
      <url-pattern>*.html</url-pattern>
      </filter-mapping>

      [...snap...]

      Given an OK, I could change the web.xml accordingly.

            Assignee:
            Unassigned
            Reporter:
            Simon Wiest
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: