6.10.1 Does LANSA know the correct CCSID to use for Multilingual text?
Partition multilingual languages are processed in the
menu item. The two values, iSeries 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 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 Review or Change a Partition's Multilingual Attributes in the .
. The two fields are and . For further information, seeIf 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 == 1140 || JobCCSID == 1146 ||
JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 037
}
}
else if ( language is FRA )
{
if ( JobCCSID == 1147 || JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 297
}
}
else if ( language is ESP )
{
if ( JobCCSID == 1145 || JobCCSID == 500 || JobCCSID == 1148 )
{
Set codepage to the Job CCSID
}
else
{
Set codepage to 284
}
}
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 -> ISeries Lang Id */
if (language code found in table)
{
Set codepage to the CCSID in the table.
Set iSeries language code to the value in the table (i.e. map from LANSA to IBM)
}
}
else
{
Set iSeries language code to the LANSA language code.
}
if ( iSeries 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 037
}
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 );
}
}
}