IBM Support

Troubleshooting special character encoding issues in WebSphere Commerce *|* -9A36C785A16FB63E852579F1006F87DB- *|*

Question & Answer


Question

Troubleshooting special character encoding issues in WebSphere Commerce *|* -9A36C785A16FB63E852579F1006F87DB- *|*

Answer

Technote (troubleshooting)


Problem(Abstract)

When leveraging the messaging composition engine within WebSphere Commerce you may notice that some special characters are not displayed correctly.

Resolving the problem

By default WebSphere Commerce uses UTF-8 character encoding. There are a few different places within the application server where the encoding type may be set:

  1. Sometimes the values specified in the WebSphere Application Server encoding.properties file may override the content type specified in the JSP.


    <WAS_installdir>/properties/encoding.properties


    C:\IBM\SDP\runtimes\base_v7\properties\encoding.properties

    Some JSTL tags such as <fmt:message "string"> cause WebSphere Application Server to reset the content type of the response to the instance's default encoding. The encoding.properties file contains a list of language/character set pairs. When the charset attribute is not explicitly defined in the HTTP request/response the application server references the encoding.properties file. You can try changing the values from the default ISO-8859-1 to UTF-8 for your applicable languages. The UTF-8 character encoding generally represents an all-encompassing character set for many different languages. The application server will need to be restarted for these changes to take effect.

    *Note: This is a global configuration change that will affect all applications running on WebSphere Application Server.

  2. The encoding type is also specified in the WebSphere Commerce LANGUAGE database table from the ENCODING column. Ensure this value is set to UTF-8 (or your applicable encoding type) for your language.

  3. Try manually setting the content type of the response to UTF-8 within the JSP itself:

    <% page pageEncoding="UTF-8" %>
    <% response.setContentType("text/html;charset=UTF-8"); %>

  4. The following two JVM parameters set in the WebSphere Application Server Administration Console will also override the character encoding type used by the application server. These parameters should only be used in the event the above approaches do not resolve the problem.

    Servers > Application servers > Java and Process Management > Process Definition > Java Virtual Machine > Generic JVM Arguments
    -Dclient.encoding.override=UTF-8
    -Dfile.encoding=UTF-8

Related information

Configuring application servers for UTF-8
WebSphere Commerce database table: LANGUAGE

Historical Number

02707
499
000

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SS73G6","label":"Sterling Total Payments for Financial Services"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
13 October 2021

UID

ibm10771047