Four Stars

[resolved] Encoding UTF-8 and ISO-8859-1 - Unix and Windows

Hello,
I have problems with ISO 8859-1 to write on IBM Solid base hosted on a Windows server (encode ISO-8859-1).
1) When I run my service locally, on a Windows server, I can change the advanced settings of the JVM on a specific job.
Like that :
Argument : file.encoding=ISO-8859-1
2 When I deploy my service on a Unix server, the ISO-8859-1 encoding does not apply. The only solution I've found to solve this problem is to change the settings directly in the JVM config file wrapper (on Unix Server):
# JVM Parameters
# Note That n is the parameter number starting from 1.
wrapper.java.additional.1 -Dkaraf.home =% =% KARAF_HOME
= wrapper.java.additional.2 -Dkaraf.base KARAF_BASE% =%
= wrapper.java.additional.3 -Dkaraf.data KARAF_DATA% =%
wrapper.java.additional.4 = -Dcom.sun.management.jmxremote
wrapper.java.additional.5 = -Dkaraf.startLocalConsole = false
wrapper.java.additional.6 = -Dkaraf.startRemoteShell = true
wrapper.java.additional.7=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
wrapper.java.additional.8=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
wrapper.java.additional.9 = -Dfile.encoding = ISO-8859-1
However, this solution does not suit me because it changes the encoding of the JVM that is UTF-8 (impact on Java webapps, others Talend jobs, ...) . Do you know anyway of forcing encoding to ISO-8859-1 for the only one service ?
Thank you!
1 REPLY
Four Stars

Re: [resolved] Encoding UTF-8 and ISO-8859-1 - Unix and Windows

Hello,
Finally, I found a solution, which is create a new Karaf container, and deploy specific services on this container.
Then, you can modifiy the wrapper config of your new container (adding this JVM parameter):
wrapper.java.additional.9 = -Dfile.encoding = ISO-8859-1