Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

RTE omitting new lines when pyBody of Email contains "¿¿¿" chara

SA-2317

Summary



RTE omitting new lines when pyBody of Email contains "张志明" characters.

Error Messages



NA


Steps to Reproduce



Send a plain text email with "张志明" Chinese character to PRPC Email Listener.
Use email content pyBody to send correspondence to other users through correspondence include pyBody in RTE.


Root Cause



The root cause of this problem is a defect in customer application code/rules. The issue initially occured only for plain text and provided below local change in activity before sending correspondence. The latest issue observed when user send plain text email with an attachment, where the contentType changing to "multipart".


String contentType = tools.findPage("ReplyEmailInfo").getProperty(".contentType").getStringValue().toLowerCase();
if(contentType.contains("ms-tnef") || contentType.contains("plain")){
String formattedValue ="<pre>" + tools.findPage("ReplyEmailInfo").getProperty(".pyBody").getStringValue().replace("\n","<br/>")+"</pre>";
tools.findPage("ReplyEmailInfo").getProperty(".pyBody").setValue(formattedValue);
}



Resolution



This issue is resolved through the following local change: 
Suggested to validate content type for "plain" and "multipart".


String contentType = tools.findPage("ReplyEmailInfo").getProperty(".contentType").getStringValue().toLowerCase();
if(contentType.contains("ms-tnef") || contentType.contains("plain")){
String formattedValue ="<pre>" + tools.findPage("ReplyEmailInfo").getProperty(".pyBody").getStringValue().replace("\n","<br/>")+"</pre>";
tools.findPage("ReplyEmailInfo").getProperty(".pyBody").setValue(formattedValue);
}

 
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us