Reputation: 413
I'm currently building a website I'm hosting on Heroku. While I love the hosting, I can't seem to get GET data to be UTF-8. When I run it locally, it works fine, but pushed to the Heroku servers it won't work.
The app is an Java Web application, all jsp pages are UTF-8 encoded, and I have a filter on all pages where the requestEncoding is UTF-8 as well. In the servlet, before I read the data, I put the encoding as request.setCharacterEncoding("UTF-8");
I'm running out of ideas, is there a simple thing I'm overlooking?
Cheers
Upvotes: 0
Views: 632
Reputation: 413
The support team of Heroku could answer my problem. If you are experiencing the same problem, this is the solution.
If you are using the latest version of webapp-runner (7.0.57.2), you can add the option --uri-encoding in your Procfile.
java ... -jar target/dependency/webapp-runner.jar --port $PORT --uri-encoding UTF-8 --expand-war target/*.war`
Upvotes: 3