IBM WebSphere Commerce

Special Character Encoding Issue in IBM WCS

Issue Summary:

While using SendMsgCmd or SendXMLOrderCreateCmd, you may notice that special characters are not encoded correctly and are displayed as junk characters in the message. This issue may also be observed in other pages like search, browse, product page and login page.

This issue is usually observed when you are using a custom language in your ecommerce site.

Solution:

  1.  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"); %>
  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.  In <WAS_installdir>/properties/encoding.properties file, ensure this is UTF-8 for the language used on your site.
  4. Go to your WAS admin console, Servers > Application servers > <Your server> -> Java and Process Management > Process Definition > Java Virtual Machine > Generic JVM Arguments and ensure below jvm parameters are set:
    -Dclient.encoding.override=UTF-8
    -Dfile.encoding=UTF-8

 

Leave a comment