Reputation: 1547
I'm using rest:0.8
to connect my main Grails project to another Grails project that serves as a report generator using this 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 then the receiving REST client will process that data. Running the two projects in my local machine works fine. Although when I deploy the war
file of the report generator to our tomcat server, it converts the letter "ñ"
to "Ñ"
, so the name "Iñigo"
is treated as "IÑigo"
.
Since the Report Generator project works fine when run on my local machine, does that means I need to change some conf
files on my Tomcat Server? What setting file do I need to change?
Upvotes: 0
Views: 72
Reputation: 507
It seems like encoding issue.
Config.groovy
: grails.converters.encoding = "UTF-8"
server.xml
(must be UTF-8).
Also try to set useBodyEncodingForURI="true"
(in connector, like URIEncoding parameter).DataSource.groovy
url parameter: url = "jdbc:mysql://127.0.0.1:3306/dbname?characterEncoding=utf8"
Also check encoding and collation of you table and fields in the database.
Upvotes: 1