Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Character encoding issues on websphere

I have the following issue concerning the application I have deployed in two application servers (websphere 8.0.0.3).

These serves have identical configuration file (at one point I exported the one configuration file and imported it to a third application server just to be sure) and I am having issues in reading and displaying files encoded in iso8859-7. One application server displays them correctly the other displays qustionmarks where a non ascii character is in the file. The other application server does not have a problem in displaying them correctly. Since as I am suspecting that the problem does not originate from the websphere, and it is a OS problem (unix SLES in all cases) I have exported the configuration file from one sevrer and installed it on a third one and all seems to work just fine.

Trying to solve the issue I have deployed a simple servlet displaying the default charset of the the jvm. On the problematic is displayed US-ASCII and on the good one displays UTF-8 . Running locale in an unix terminal as the user running the application server, lang is set on en_US.UTF8 on both machines.

A final thing that I would like to add, is that the application also writes log files using slf4j with log4j binding. On the problematic server the log file is ASCII and on the good one is UTF-8. As it is obvious logging iso8859-7 chars in the log, displays questionmarks (?) instead of the actual character.

My question is whether I should keep looking for mis-configuration problems in the websphere or it is a problem of the operating system setup

Thank you in advance

Vasileios Mylnakis

like image 464
airmil Avatar asked Oct 03 '22 06:10

airmil


1 Answers

Is the websphere ran on difference operating system ?

you can force WebSphere to use UTF-8 by adding these JVM Arguments

-Dclient.encoding.override=UTF-8
-Dfile.encoding=UTF-8

ref:

http://www-01.ibm.com/support/docview.wss?uid=nas8N1014138 http://www-01.ibm.com/support/docview.wss?uid=swg21593033

like image 68
Isara Rungvitayakul Avatar answered Oct 13 '22 07:10

Isara Rungvitayakul