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);
}
Published January 31, 2016 - 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.