Support Article
Special characters are not displaying correctly
SA-31955
Summary
User has created a case with the Email listener, an email send out from Pega with the body below.
This is an HTML rule. This is to confirm that your request for <pega:reference name=".pyInboundEmail.pySubject" format="scalar"></pega:reference> has been received. Your case ID
<pega:reference name="pyWorkPage.pyID" format="scalar"></pega:reference> should be used to track and reference this request.
Whenever, there are special characters like "" or ' ' in the value of the property .pyInboundEmail.pySubject, it’s getting encoded and ASCII code is getting displayed.
For example, when the value of the property is 14th Nov '16 the email that is send out has the value displayed as 14th Nov'16.
Error Messages
Not Applicable
Steps to Reproduce
1. Send an email from Pega with the body of the email configured in an HTML rule.
2. Include special characters like " " or ' ' in the Property reference values in the body of the email.
3. Observe that Special characters are replaced by a code.
Root Cause
An issue in the custom application code or rules, string value for the property containing special character should be fetched and then referred in the email body.
Also, no UTF-8 encoding at server end.
Resolution
Apply either of the Local Changes to resolve
1. Fetching the value of property containing special character and get it's string value:
For Example:
<%tools.appendString(tools.getPrimaryPage().getProperty(".<YourPropertyName>").getStringValue());%>
2. Set the environment variable for the server as below:
Add "-Dfile.encoding=UTF-8" in Setenv.bat
3. Restart the server.
Published January 24, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.