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

Special characters encoded in uploaded attachment file path



Application uses an Out-of-the-Box (OOTB) FilePath control to upload file to the server and OOTB Text (TextBox with parameters) control to display uploaded file path on the server to the user at runtime.
If the file name contains special characters, for example, File(www).txt, they show up encoded in the Text control:

The Text control is set to display Clipboard pxRequestor.pyFileUpload property on section refresh:

Error Messages

Not Applicable.

Steps to Reproduce

Create a section containing two OOTB controls as described in the Summary.
At runtime upload a file containing special characters in the name, for example, parenthesis as in File(www).txt

Root Cause

Before Pega 7, pyFileUpload Clipboard property did not contain encoded special characters, which caused unpredictable encoding on the server that depended on the specific encoding schema utilized by the operating system (OS) where Pega server was deployed.
In Pega 7 an enhancement was introduced that cross-OS encodes special characters in the filename before it is saved on the server. The unintended fallout of this enhancement was: any application displaying pyFileUpload Clipboard property to the user, would expose encoded special characters.


Perform the following local-change:

Create uniquely named custom control by “saving as” the “available” OOTB Text control. Then modify code under HTML tab to cross-OS decode file name, as in this snapshot:


Published May 25, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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