0

My project uses 2 property file based on the locale message.properties and message_de.properties. The German property file contains umlaut. The issue is that when I use Jenkins to deploy the ear in JBoss server, the message_de.properties is not encoded properly. But when I manually generate an ear in Windows and then copy to the server(linux machine), this issue is not found. Please note I have used ISO-8859-1 for encoding.

user1372469
  • 51
  • 1
  • 1
  • 12
  • I came across this https://stackoverflow.com/questions/7345012/ear-encoding-inside-the-archive. For Jenkins deployment, my source code is pulled from GIT. In GIThub, i could see that the end of lines had this character ^M. I have corrected that. But even then, the issue exits – user1372469 May 13 '20 at 14:19
  • Is the encoding correctly set in your project? BTW: Which Java version? – khmarbaise May 13 '20 at 16:18
  • Yes, the project uses ISO-8859-1. Java version is 1.8 – user1372469 May 14 '20 at 02:28

1 Answers1

0

The encoding issue of umlauts was occurring when the code was deployed through Jenkins. I have resolved it by setting the below value in Jenkins environment property JAVA_TOOL_OPTIONS=-Dfile.encoding=ISO-8859-1

The following link gives an example on how to set the environment property in Jenkins https://www.linkedin.com/pulse/how-resolve-utf-8-encoding-issue-jenkins-ajuram-salim

user1372469
  • 51
  • 1
  • 1
  • 12