Problems with character encoding on a web page

I have the following problem regarding an application that I deployed on two application servers (websphere 8.0.0.3).

These files have an identical configuration file (at some point I exported one configuration file and imported it to a third application server to be sure), and I am having problems reading and displaying files encoded in iso8859-7. One application server displays them correctly, and the other displays qustionmarks, where the non ascii character is in the file. Another application server has no problems displaying them correctly. Since I suspect that the problem does not arise because of the web sphere, and this is a problem with the OS (unix SLES in all cases), I exported the configuration file from one sevrer and installed it on the third, and everything seems to work just fine.

Trying to solve the problem, I deployed a simple servlet displaying the default jvm encoding. US-ASCII is displayed on the problematic, and UTF-8 on good. Running the locale in the unix terminal as the user starting the application server, lang is installed on en_US.UTF8 on both machines.

The last thing I would like to add is that the application also writes log files using slf4j with log4j binding. On the problem server, the log file is ASCII, and on a good server, UTF-8. As is obvious, the iso8859-7 journal entry in the journal displays question marks (?) Instead of the actual character.

My question is whether I should look for problems with incorrect configuration in websphere or is this a problem installing the operating system.

Thank you in advance

Vasily Milnakis

+4
source share
1 answer

Does websphere run on a differential operating system?

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

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

link

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

+2
source

Source: https://habr.com/ru/post/1496599/


All Articles