Issue
Uploading an attachment with special characters in its filename results in the retrieved file displaying hexadecimal values instead of special characters.
For example, ‘myFile(1).txt’ appears as ‘myFile$281$29.txt.’
Steps to reproduce
- Navigate to the Case Manager portal.
- Upload an attachment with special characters in the filename.
- Retrieve the uploaded file.
Root Cause
This issue occurs due to the ‘pxDecodeCrossOSString’ function not being executed on the ‘pxAttachName’ property before the download is invoked. It can be caused by (but is not limited to) the following scenarios:
- Custom functionality being used to retrieve or download files. For example, bypassing out-of-the-box (OOTB) attachment storage options or using custom display methods may result in issues if the ‘pxDecodeCrossOSString’ function is not utilized.
- A known issue in the Pega Platform where the ‘pxDecodeCrossOSString’ was not included in the OOTB ‘pyDownloadAttachmentContent’ activity.
Solution
An enhancement request has been raised for this issue but has not yet been assigned to a specific release.
Workaround
In the interim, perform either of the following workarounds:
Custom implementations
For custom implementations, call the ‘pxDecodeCrossOSString’ function on the ‘.pxAttachName’ (or equivalent) property before initiating any download or display-related processing.
OR
OOTB ‘pyDownloadAttachmentContent’ activity
An upcoming platform release will update the OOTB ‘pyDownloadAttachmentContent’ activity to include the ‘pxDecodeCrossOSString’ function for improved cross-platform string handling. As an interim workaround, save the activity into an application ruleset and invoke ‘pxDecodeCrossOSString’ at the beginning of the activity, targeting the ‘.pxAttachName’ property.
On encountering an OOTB scenario not covered in this document, please create a support ticket for further assistance. For more information on this topic, see Creating a support ticket.