Partition multilingual languages are processed in the Work With Partition Multilingual Attributes menu item. The two values, IBM i EBCDIC CCSID and Windows ANSI code page are stored in F60CHR in DC@F60.
|
Any future references to F60CHR (or X60CHR) in this section is referring to the IBM i EBCDIC CCSID and Windows ANSI code page values specified for a language.
You are responsible for ensuring the IBM i F60CHR values and windows X60CHR values are valid (and up-to-date on the PC if changed on the IBM i). LANSA uses the default values listed in the table following when X60CHR has a blank value.
DBCS languages must be set to the correct code for the language, otherwise DBCS translation will not be performed correctly by Host Monitor. For example, Korean MUST use KOR.
All languages that are in the following table should use the listed LANSA language code otherwise the defaulting of the IBM i CCSID and Windows codepage will not be correct. If a language is not listed, then X60CHR must be specified. Amongst other things this affects Host Monitor, multilingual text and source code multilingual text.
F60CHR in DC@F60 is set using Multilingual Partition SAA / CUA Defaults. The two fields are IBM i EBCDIC CCSID and Windows ANSI codepage. For further information, see Review or Change a Partition's Multilingual Attributes in the LANSA for i User Guide.
If a default value is needed on Windows, it is calculated by first by looking up the language in ccsid.txt. If the language is not found there, the current operating system codepage is used.
This table is formatted as follows:
|
On IBM i the fallback position is the same table as for Windows, using the IBM i CCSID. But prior to that an algorithm is used to obtain a best default CCSID if possible. The algorithm is currently as follows and may be changed at any time by LANSA.
static void GetCCSID( char * pvchLanguage, UTC_CodePage * pCodePage )
{
Get the job CCSID
/* Check if the Job CCSID overides the default */
if ( JobCCSID == 500 || JobCCSID == 1148 )
{
if ( language is one of FRB, FRC, DEU, DUT, FIN, ITL, NOR, POR, SWE or SFRA)
{
Set codepage to the Job CCSID (500 or 1148)
}
}
if ( language is ENG )
{
if ( JobCCSID == 285 || JobCCSID == 37 || JobCCSID == 1146 ||
JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 1140
}
}
else if ( language is FRA )
{
if ( JobCCSID == 297 || JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 1147
}
}
else if ( language is ESP )
{
if ( JobCCSID == 284 || JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 1145
}
}
else if ( language is JPN )
{
/* This is a workaround for QLGRTVDC which returns 5026 unless the
QTQ_DEFAULT_CCSID environment variable is explicitly set to 5035 */
if ( JobCCSID == 5035 )
{
Set codepage to the Job CCSID
}
}
if ( codepage has been set )
{
return;
}
/* Convert LANSA Lang Id -> IBM I Lang Id */
if (language code found in table)
{
Set codepage to the CCSID in the table.
Set IBM i language code to the value in the table (i.e. map from LANSA to IBM)
}
}
else
{
Set IBM i language code to the LANSA language code.
}
if ( IBM i language code is a valid IBM language code )
{
/* QLGRTVDC only works on systems >= V5R2 */
P8601_GetOSReleaseNumber( &releaseNo, &chRetCode );
if ( release >= V5R2 use IBM language code to obtain the "Input CCSID")
{ Set codepage to the Input CCSID
}
/* else the default will be used as set above when language code found in */
/* Note that if the language code is NOT found in the table and the OS400 */
/* release is BEFORE V5R2 then the codepage is not set. This implies that*/
/* in this case an override MUST be provided in F60CHR. */
}
else
{
/* Unrecognised language requested. Use default JobCCSID. No distinction
is required at the moment between LLL (special language code) and
other unrecognised language codes */
if ( JobCCSID != 0 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 1140
}
if ( language is not LLL )
{ if ( message not yet issued for this language )
{
Issue log message
"Language code not recognised: %s. Using default Job CCSID %ld",
vchISeriesLang,
*pCodePage );
}
}
}