grails - Diacritic Letters are mistreated by Rest Client -


i'm using rest:0.8 connect main grails project grails project serves report generator using line of code:

map<string, string> adminconfigservice = [     weburl: "http://192.168.20.21:8080/oracle-report-service/generate",     ... ]  map params = [     ...     name: "iñigo",     ... ]  withhttp(uri: adminconfigservice.weburl) {     html = get(query: params) } 

and receiving rest client process data. running 2 projects in local machine works fine. although when deploy war file of report generator our tomcat server, converts letter "ñ" "├â┬æ", name "iñigo" treated "i├â┬æigo".

since report generator project works fine when run on local machine, means need change conf files on tomcat server? setting file need change?

it seems encoding issue.

  1. check config.groovy:

grails.converters.encoding = "utf-8"

  1. check file's encoding of controllers , services use rest:0.8.
  2. check uriencoding in tomcat's server.xml (must utf-8). try set usebodyencodingforuri="true" (in connector, uriencoding parameter).
  3. do save data database? if so, check datasource.groovy url parameter:

url = "jdbc:mysql://127.0.0.1:3306/dbname?characterencoding=utf8"

also check encoding , collation of table , fields in database.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -