I have written an RPGLE CGI program to retrieve a html file from the IFS (via SQL and CLOB_FILE) and return it to the requestor (via QtmhWrStOut()). To see if I could.
As far as I understand, because of the web server settings, QtmhWrStOut() character set converts from EBCDIC 37 to UTF-8. The HTML file is UTF-8. So I am reading the HTML IFS file into a CCSID 37 host variable to character set convert it, and passing that to QtmhWrStout(). This is effectively double converting it - UTF-8 -> EBCDIC 37 -> UTF-8
Is there a way to use QtmhWrStOut() in a way that means it does not character set convert? So I do not need to double convert the HTML file? Or so I can return a binary file like a PDF?
As far as I understand, because of the web server settings, QtmhWrStOut() character set converts from EBCDIC 37 to UTF-8. The HTML file is UTF-8. So I am reading the HTML IFS file into a CCSID 37 host variable to character set convert it, and passing that to QtmhWrStout(). This is effectively double converting it - UTF-8 -> EBCDIC 37 -> UTF-8
Is there a way to use QtmhWrStOut() in a way that means it does not character set convert? So I do not need to double convert the HTML file? Or so I can return a binary file like a PDF?
Comment