Excel File Name is incorrect when contains Cyrillic characters
SummaryUser is creating Excel file by using the out-of-th-box OOTB activity "MSOGenerateExcelFile".
When the File name parameter "FSFileName" contains some Cyrillic character then user is getting some unknown encoded characters in the file name instead of Cyrillic Name.
For Example: Expected File Name is "Ромашка_CurrentDateTime.xlsx".
Actual File Name that we are getting is "--0H-0_CurrentDateTime.xlsx"
Steps to Reproduce
- Call the Activity MSOGenerateExcelFile on the Pagelist which contains data to be filled in excel.
- Pass the FSFileName parameter with some Cyrillic text in it.
Root CauseA defect in Pegasystems’ code or rules In MSOGenerateExcelFile activity, the generated file download path is set on to the pxRequestorPage.pyFileDownload. Until this point the non-ascii characters are maintained. After that engine API will take care of downloading this file to client. The issue is that Content-Disposition=attachment;filename= contains non-Ascii characters and used for header.
When the name of the file to downloaded has Cyrillic characters, the file name upon downloading has space characters in place of the Cyrillic characters. This is because the characters in file name are not encoded using the same character set which will be used by browser to decode which will be the default one of the browser unless specified.
BUG-216805 has been fixed in Pega 7.2 The name of the file to be downloaded will set as part of Content-Disposition response header, this header is being modified to another format to support non-ASCII characters In the latest release Pega made changes in HttpAPI.returnFileForDownload() to send the response header Content-Disposition as per latest RFC to support non ASCII characters in file name.
Published July 20, 2016 - Updated July 27, 2016