Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5909

Set a LocalizationContext in javax.servlet.jsp.jstl.core.Config to ensure JSP reads message-bundle-files with same encoding (UTF-8) like freemarker

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Won't Fix
    • Affects Version/s: 5.2.8, 5.3.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Recently when testing some i18n-support for templating, i realized, that in freemarker-context, a properties-file is read with UTF-8 (see DefaultMessagesImpl#getBundle), but in JSP-context, JSTL expects ISO-8859-1 encoding.
      That means: When you want to use the same resource-bundle for both freemarker- and jsp-templates, you have to encode everything the \u1234 -way.
      Anyway, since http://jira.magnolia-cms.com/browse/MAGNOLIA-5652 and since new i18n-usage, we don't encode texts in resource-bundles anymore.

      By plugging into the JSP i18n handling and delegate resolution into Magnolia code we can ensure both jsp and freemarker are reading the bundles with same encoding.
      To do so, we should set a LocalizationContext in javax.servlet.jsp.jstl.core.Config

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cmeier Christoph Meier
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: