Special International Characters Appear Corrupted in the View Log/Trace Files

Special international characters in the View Log/Trace files appear corrupted when viewed directly in the browser from the View Log/Trace link in Process Monitor.

Description

Browsers automatically assume that files are in native encoding such as Latin-1. For example, if a UTF-8 file does not have a byte order mark specified, the browser automatically and incorrectly assumes that the file is encoded in Latin-1. Therefore, when you view the trace files directly from the View Log/Trace link in Process Monitor, special international characters are displayed as corrupted characters.

However, these characters display correctly when the files are viewed in a text editor, such as Notepad or Notepad++.

Solution

To view special international characters correctly in the browser from the View Log/Trace link in Process Monitor, you can implement either of the following solutions:

  • Change the web.xml file.

  • Change the Process Scheduler character set.

Although you can use either of these two methods, changing the web.xml file is the preferred option because it keeps all the characters in UTF-8 as delivered. Also, if you are updating a web.xml file, then changing the web.xml file is preferred.

Change the web.xml File

To change the web.xml file:

  1. Navigate to webserv/<DOMAIN>/applications/peoplesoft/PORTAL.war/WEB-INF/web.xml.

  2. Take a backup of the file.

  3. Open the file web.xml in a text editor.

  4. Change the line:

    <mime-mapping> <extension> log </extension> <mime-type> text/plain </mime-type> </mime-mapping>

    to:

    <mime-mapping> <extension> log </extension> <mime-type> text/plain;charset=utf-8 </mime-type> </mime-mapping>
  5. Add the line:

    <mime-mapping> <extension> stdout </extension> <mime-type> text/plain;charset=utf-8 </mime-type> </mime-mapping>
  6. Save the file.

  7. Bounce the Web Server and Process Scheduler, and then clear their Cache folders.

  8. Test by submitting a new process.

Note: You can also use this method to configure files with other extensions besides .stdout and .log.

Change the Process Scheduler Character Set

To change the Process Scheduler character set:

  1. Open the Process Scheduler configuration file (psprcs.cfg) and Application Server configuration file (psappsrv.cfg).

  2. Navigate to the [PSTOOLS] parameters.

  3. Set the character set to the native encoding character set on your system. For example, for native Japanese encoding, you can set the character set to SJIS.

  4. Save the files.

  5. Bounce the Web Server and Process Scheduler, and then clear their Cache folders.

  6. Test by submitting a new process.