Setting the encoding in the server trace

Set the sample server start script to display the correct characters in trace messages. This problem occurs in Windows environments.

Symptoms

When you start the sample server in Windows, the trace messages might contain strange characters. You can fix this problem by changing the encoding in the sample server start script.

Environment

To display the correct characters, you must specify the encoding in the startserver.bat script.

Resolving the problem

  1. Open a command prompt, type the chcp command, and press Enter. The window displays the number of the active console code page.
  2. Search for the Java encoding name in JDK 21 Documentation . For example, on a French computer, the encoding might be Cp850.
  3. Open <InstallDir>/shared/bin/startserver.bat, and add the following line (this example uses the French encoding number): set ANT_OPTS=-Dfile.encoding=Cp850.