[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 Created: 05/Sep/14  Updated: 03/Oct/18  Resolved: 03/Oct/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.2.8, 5.3.3
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 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


Generated at Mon Feb 12 04:09:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.