Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
F
frascati
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 114
    • Issues 114
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • frascati
  • frascati
  • Issues
  • #119

Closed
Open
Opened Jul 19, 2013 by Marc Dutoo@mdutoo

Velocity servlet : allow to configure request encoding

In Tomcat, Velocity servlet decodes an HTML Form's POST parameters using Tomcat's default encoding ISO-8859-1 (because browsers don't provide encoding), which produces ugly (c)-like badly encoded characters on server side when commonly expecting UTF-8.

This is a well known case, see :

  • tomcat's own and most common solution, using a ServletFilter doing request.setCharacterEncoding() http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q2 http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Set_Character_Encoding_Filter
  • and source http://code.google.com/p/forsecond/source/browse/trunk/compare/src/com/jz/filter/SetCharacterEncodingFilter.java?r=39
  • discussion http://stackoverflow.com/questions/8391675/utf-8-encoding-a-servlet-form-submission-with-tomcat

Note that Velocity's own servlet does not handle it (but allows to configure output content type) http://www.docjar.org/html/api/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java.html

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: frascati/frascati#119