zendtech / IbmiToolkit

PHP frontend to XMLSERVICE for IBM i development.
BSD 3-Clause "New" or "Revised" License
46 stars 34 forks source link

Retrieve actual CCSID in getPhpCcsid() #148

Open alanseiden opened 3 years ago

alanseiden commented 3 years ago

https://github.com/zendtech/IbmiToolkit/blob/46e1274caed692793abd21158ac051e49e796e6b/ToolkitApi/Toolkit.php#L2529

The current code relies on the CCSID variable being set in fastcgi.conf. This variable might not always be set. Get the actual CCSID instead.

It affects the CW. Possibly spool file functionality.

alanseiden commented 3 years ago

For now, ensure compatibility with previous PHP builds and releases by ensuring that the CCSID variable is set in fastcgi.conf. For example, we will make this change in the Seiden CommunityPlus+ PHP siteadd template.

In future, eliminate the need for this method, which is only used by the CW spool file data function, by utilizing SYSTOOLS.SPOOLED_FILE_DATA (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqudfspooldata.htm).

alanseiden commented 3 years ago

Disadvantages of SYSTOOLS.SPOOLED_FILE_DATA: