Facing the issue about the Control Charcter email (Start of Text (STX) symbol)

Hi Pega and Team,

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.

We have validated by using the Edit Validate Rule.

But why this Control Character Adding/Control Character Converted automatically.

Do we have a thoughts on this?

Thanks,

Ashok

@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.

See our support document:

Troubleshooting Rich Text Editor issues

Copy-Paste issues with Microsoft Word and Excel

Operating system and browser support for Copy-Paste with Microsoft Word and Excel

Hi @MarijeSchillern,

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 (␂).

Thanks,

Ashok

@Bhumireddy it might be worth your while logging this as a support incident via the MSP.

Please let us know the INC here so that we can help track it.

Hi @MarijeSchillern,

As I said in the question, we are validating it by using the edit validate rule for this kind of character.

STX.jpg

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;

Thanks,

Ashok