Date: Thu, 28 Mar 2024 19:18:51 +0000 (UTC) Message-ID: <1102867783.399.1711653531639@library.aws.roguewave.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_398_1105239244.1711653531637" ------=_Part_398_1105239244.1711653531637 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Issue= span>
Zend Server for IBM i provides a menu option to set CCSID and Language o= ptions for Apache and FastCGI. This article tells how to make the rec= ommended settings.
Environment
Zend Server for IBM i running on any supported version of IBM i.
Resolution
Please use the menu option to set CCSID and Language options for FastCGI=
and Apache.
From the 5250 Command line:
GO ZENDPHP74/ZSMENU
use option "80. Configurations" an= d then "2. Set Zend Server Language/CCSID environment"
GO ZENDPHP7/ZSMENU
use option "80. Configurations" and then "2. Set Zend Server Language/CC= SID environment"
For versions up to 8.0.2, use option "8. Set Zend Serve= r Language/CCSID environment".
For versions 8.5 and higher, use option "80. Configurat= ions" and then "2. Set Zend Server Language/CCSID environment"
Use option "8. Set Zend Server Language/CCSID environment".
1) Under the heading "FastCGI Language and CCSID settings", please se=
t the CCSID to 1208. Leave the Language ID set to 'C'.
2) Under the heading "Apache web server settings", please set the val=
ue for DefaultFsCCSID and CGIJobCCSID to the recommended value for your lan=
guage (see note below).
3) Press Enter to update, and then restart Apache for this change to =
take effect.
Note: To determine the default CCSID f= or your language, you can try this trick.
On the "Display Job" display, use option "2. Display job definition attr= ibutes". On the "Display Job Definition Attributes" display, page up = a few times until you come to the Language entries:
Language identifier . . . . . . . . . . . . . . . : ENU &n= bsp;
Country or region identifier . . . . . . . . . . :  = ; US
Coded character set identifier . . . . . . . . .= : 65535
Default coded character set identifier . . . = . . : 37
Use the value set for "Default coded character set identifier". In= this example the CCSID to use is '37'. If you need to include the Eu= ro, please see the additional note below.
Here is an example of the options that would be set in a typical U.S. in= stallation running Zend Server 8.5.x
Set Zend = Server Language/CCSID Environment = &nb= sp;
&= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p;
IBM i server CCSID and Language settings &nbs= p; &= nbsp; &nbs= p;
System = CCSID . . . . . .: 65535 &nb= sp; = &nb= sp;
Job CCSID . = . . . . . . . 65535 &n= bsp;  = ; &n= bsp;
Language ID . . .= . . . : ENU &nb= sp; = &nb= sp;
&= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p;
&n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ;
&nb= sp; = &nb= sp; = &nb= sp; =
FastCGI La= nguage and CCSID settings (/www/zendsvr6/conf/fastcgi.conf) &nbs= p;
CCSID (ASCII) . . . . . : 1208&= nbsp; Number, 819(Latin), 1208(UTF-8)...
= Language ID . . , , , , : C  = ; en_US, de_DE, fr_FR... &nb= sp;
&= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p;
Link for ASCII CCSID= and Language table codes: &= nbsp; &nbs= p;
http://files.zend.co= m/help/Zend-Server-IBMi/i5_national_language_support.htm
&nb= sp; = &nb= sp; = &nb= sp; =
Apache web= server settings (/www/zendsvr/conf/http.conf)  = ; &n= bsp;
CGIJobCCSID . . . . . . : 37 N= umber, 37(ENU), 297(FRA), 273(DEU)...
DefaultFsCCSID. . . . . :&= nbsp; 37 Number, 37(ENU), 297(FRA), 273(DEU)...
Find a CCSID that includes the Euro
IBM has provided some enhanced EBCDIC character sets to include the Euro= . If you need the Euro, please find your EBCDIC CCSID (the one used f= or DefaultFsCCSID) on this page:
Co= ded character set identifiers
Find your CCSID on this page and click it. This should take you to= a detail page for your CCSID. For example, if we click on 37 we get = to this page:
In the notes section, there is this text:
Related CCSID with euro is 1140
So, if we need the Euro, we could set DefaultFsCCSID and CGIJobCCSID to = 1140. Of course, this might also be the current CCSID for our job, as= described in the main section above. In this case, we would look at = the page for 1140:
And see this note:
Related CCSID without euro is 37
Then we would know this is the correct CCSID to contain the Euro, and th= is is the correct setting.
ibm_db2 settings for DBCS
For DBCS, there are a couple of settings for the ibm_db2 extension that = can help insure your DBCS characters are translated correctly for display o= n the web. These settings can be accessed in the Zend Server User Int= erface, on the Configurations -> PHP tab. Please find ibm_db2 on t= he list of PHP extensions (under the heading "Name") and click it once to e= xpand the list of related directives for the extension. Find this dir= ective:
ibm_db2.i5_dbcs_alloc
The default value is "no expanded allocations". Please use the dro= p down to select "use expanded allocations". This will insure that in= ternal buffers used to store DBCS columns are sufficiently large to contain= the DBCS data. Click the "Save" button (upper left, above the table)= to save the change, then restart for the change to take effect.
Users of Zend Server 7 or later may also find this directive:
ibm_db2.i5_override_ccsid
This directive can force the use of UTF 8 under some circumstances. = ; If you are having difficulty getting your DBCS characters to display corr= ectly, please try adjusting this setting. The default is "default PAS= E CCSID". Try changing it to "force utf-8 PASE CCSID (better DB2 oper= ations)". As before, click "Save" and restart for the change to take = effect. This directive is only available for ibm_db2 running on the I= BM i. It cannot be implemented for connections from other platforms.<= /p>