Search This Blog

Friday, February 5, 2016

Character Encoding Changes in Tomcat 8 for GET Requests

HTTP GET requests (url+parameters) are treated as ASCII characters by default. Non-ASCII values, however, need to be converted to ASCII by using escape sequences. 

This conversion behavior has been changed in Tomcat 8:
  • Before Tomcat 8 the default character encoding of the entire GET request was ISO-8859-1, so if your request contains UTF-8 characters (which is very common) you need to manually decode the escaped (ASCII) text back to UTF-8.
  • Starting with Tomcat 8 the entire GET request is treated as UTF-8 by default but this can be changed to conform with the servlet specification.

No comments:

Post a Comment