Support Article
Special characters replaced by ? on document generation
SA-64924
Summary
Special characters (including but not limited to currency symbols and speech marks) are added to the document as question marks instead of the expected character. This occurs when generating documents at the server side (using pzGenerateDocuments) instead of client side (using Silverlight).
A similar issue occurs when passing the correspondence stream to the log using Public API methods:
htmlStream = new StringBuilder();
keys.putString("pxObjClass", "Rule-Obj-Corr");
keys.putString("pyCorrType", "Mail");
keys.putString("pyClassName", pgWork.getString("pyClassName"));
keys.putString("pyStreamName", aPegaTagValue);
htmlStream.append(localTools.getStream(keys, localTools.getPrimaryPage()));
oLog.error(htmlStream);
Error Messages
Not Applicable
Steps to Reproduce
- Store the HTML required for document generation in a local property.
- Insert the HTML from that property in to the document.
Root Cause
A defect or configuration issue in the operating environment.
The file encoding used by the JVM was set to ANSI.
Resolution
Make the following change to the operating environment: Change the JVM file encoding to UTF-8.
Use the below system property setting:
-Dfile.encoding=UTF-8
Published October 7, 2018 - 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.