Skip to main content

Troubleshooting special character encoding issues in WebSphere Commerce


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

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

WebSphere Commerce Enterprise

Messaging


Software version:
6.0, 7.0


Operating system(s):
AIX, Linux, Solaris, Windows, i5/OS


Software edition:
All Editions


Reference #:
1593033


Modified date:
2012-10-23

Translate my page

Content navigation