While entering the Case Description on the Case, Sometimes user is copying the data from the PDF/Word Document, When user is pasting the data into the Case Description Text Area Property, Some characters are automatically added/converted into the email (e-mail this is the original text) In between E and M Square box is added automatically. The Exact meaning of the Square Box is ␂ (Start of Text) and ASCII code: U+0002. It is causing issue in the external systems, The External System is not able to find this Character. It is throwing the error and It is not able to process the Cases Data.
@Bhumireddy When you copy and paste data into a text area property in Pega, control characters may be added due to the way the system handles newline characters. The newline is interpreted by the browser as ‘\r\n’ and counted as two characters. This is a standard behavior of text area fields in web applications, not just Pega. If you want to avoid this, you may need to implement a custom solution to strip these control characters during the paste operation.
As we know new line it will be add automatically while pasting the data into the pega, But I am worrying about this Start of Text character (␂) It is one of the control character (␂).
As I said in the question, we are validating it by using the edit validate rule for this kind of character.
below are the java code
for (int pos = 0, len = theValue.length(); pos < len; ++pos)
{
char c = theValue.charAt(pos);
int ascii =(int)c;
if (ascii==2) // This is blocking the STX Symbol
{
theProperty.addMessage("Not Allowed Special Characters , Please Remove Special Characters in Between e and m ");
return false;
}
}
return true;