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.
- check
config.groovy
:
grails.converters.encoding = "utf-8"
- check file's encoding of controllers , services use rest:0.8.
- check uriencoding in tomcat's
server.xml
(must utf-8). try setusebodyencodingforuri="true"
(in connector, uriencoding parameter). - 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
Post a Comment