daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
56 stars 25 forks source link

Arabic Letters not support for "_outFilename" parameter #140

Open HamzaAlabbasi opened 9 months ago

HamzaAlabbasi commented 9 months ago

Version: 2.10.1 Hi, When I use Arabic letters in "_outFilename" parameter the output file name appears as "___.pdf" any help ? Thanks in advance.

daust commented 2 months ago

Did you escape the outFilename? It is passed on the URL, thus it needs to be converted first into "safe" characters for the http request as it is used as an url parameter.

You can try to use: apex_util.url_encode('<arabic filename>') to encode the filename. See integration-usage for an example.

HamzaAlabbasi commented 2 months ago

Hello Dietmar, Actually, I'm using JavaScript for calling reports. I use encodeURI() but it doesn't work.

window.open("http://localhost:8080/jri/report?_repName=TEST%2FMain&_repFormat=pdf&_outFilename=" + encodeURI('') + ".pdf&_dataSource=testds&_repLocale=en_US&P_INVOICE_ID=1", "_blank");

Thanks.

daust commented 2 months ago

So, you are not using Oracle APEX, or the xlib_jasperreports packages to call the report, but you are using it directly ... just the J2EE app?

Can you please send me a simple html file with arabic characters how you call it? That would be easier for me to troubleshoot.

Thank you very much. You can send it to dietmar dot aust at gmail dot com. Thank you for your help.

I guess you only need the above statement and insert the arabic characters into the file. That's it.

HamzaAlabbasi commented 2 months ago

Ok. Thanks for your help.