[MGNLFORUM-15] Encoding issue when posting messages Created: 02/May/07  Updated: 02/Dec/13  Resolved: 11/May/07

Status: Closed
Project: Forum (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: m1

Type: Bug Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-1512 Request charset should be set before ... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

If i post a message with accents, they're messed up when rendering.



 Comments   
Comment by Magnolia International [ 07/May/07 ]

This is due to

  • the fact that tomcat will encode/decode everything in iso-8859-1 by default
  • our page is in utf-8
  • one can override the encoding, as our ContentTypeFilter does
  • any encoding overriding is only effective if done BEFORE any parameter is requested from the request (i.e the container parses the parameters lazily)
  • we do request.getParameter too early for the above to work, because of the way the WebContextImpl.getAttribute is implemented: if an attribute isn't found, we try to get it as a parameter request.

I'm not sure why we do the latter, because imho request attributes and parameters should be merged transparently. There are certainly cases where this is desirable, but that should be marginal and should not be transparent (i.e not handled by the Context class). As a side note, Im not sure I get the idea behind MAGNOLIA-1487, not sure how the implemention does anything useful ?

Comment by Magnolia International [ 09/May/07 ]

this should get resolved by MAGNOLIA-1512

Comment by Magnolia International [ 09/May/07 ]

re: my previous comments:

  • MAGNOLIA-1487 has been changed, and we now only expose precise request properties as attributes
  • parameters and attributes are "merged" mostly because other contexts (Workflow context for instance) don't have the notion of 2 different types of attributes
Comment by Christoph Meier [ 02/Dec/13 ]

closed, since it has been resolved long time ago

Generated at Mon Feb 12 01:59:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.