Link to home
Start Free TrialLog in
Avatar of zequestioner
zequestioner

asked on

Java charset encoding issue

Two servers running the same version of Java output/print characters differently. For example, on the working server "é" gets handled correctly however the other servers outputs/writes this character as "?".

Java version is 1.7.0_01-b08 and Tomcat on both servers is 7.0.54.

Both servers have the exact same output for:

uname -a
java -version
locale
export | grep LANG

Both servers seem to 'echo' the character without issue from the command line, even writing a compiling a java program to export a file with the characters works correctly. The issue is only present via the java web app running on Tomcat. The exact same code base is running on both servers, so we don't believe it's the code.

Is there anything else i should be looking at?
SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The issue is only present via the java web app running on Tomcat.

Where are you seeing these characters? Are you printing something to the console, are they in the log files or is it characters that are rendered at the browser?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zequestioner
zequestioner

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for zequestioner's comment #a40924673

for the following reason:

Odd issue, very helpful suggestions but the solution was unpredictable for EE experts.
Your solution is alias of first 3 comments.
http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html