The IPF Compiler, IPFC supports the DBCS as well as SBCS. Like the resource compiler, you need to specify a valid country code or code page parameter to have a correct compile result for your information source file. You need to specify the language ID (both contry code and codepage when you compile the source file written in a code page for other country code than your system) parameter when you execute the IPFC. The syntax is as follows:
/COUNTRY= /CODEPAGE=If you do not specify these options, the values of the compiler runtime environment are applied. The following parameters can be specified. (**)
┌───────────────┬─────────────────────────┬───────────────┐ │Country code │Code Page ID │Description │ ├───────────────┼─────────────────────────┼───────────────┤ │081 │932, 942, 437, 850 │Japan │ ├───────────────┼─────────────────────────┼───────────────┤ │082 │934, 944, 437, 850 │Korea │ ├───────────────┼─────────────────────────┼───────────────┤ │088 │938, 437, 850 │R.O.C │ └───────────────┴─────────────────────────┴───────────────┘The following example generates .INF file for Hanguel:
IPFC example.txt /INF
/COUNTRY=082
/CODEPAGE=944
Note: The country code and codepage which can be specified to IPFC options are defined in COUNTRY.SYS file provided by OS/2. Thus, the value is subject to be changed when the system supports new code pages.
A DBCS unique command, sortkey, for country-unique sorting of help items are supported by SBCS IPF compiler as well. Application developers or translators can add a phonetic reading (or whatever you like) to each translated help index topic (ICMD tags). Then, help indexes will be sorted in a meaningful sequence (typically, the order of the phonetic readings). The following example shows the usage of the sortkey tag
:i1 id=mcdonald sortkey='MacDonald'.McDonald
The information resources can include the code page information. If you specify the code page parameter on the command line, then the code page is assigned to the whole document. If you use the ;font. tag to specify the code page in a header section, then only that section has the specified code page. If you do not specify the code page, then the default code page is applied.
Some block characters or graphic characters have the different code values among code pages. Thus, these characters may not be represented correctly when they are displayed in the environment other than one in which the source file was created. To solve this problem, you must specify the SBCS code page when you compile the source file, or specify the code page inside the document. If you want to use the block characters in a DBCS environment, then you need to use the defined symbol characters, such as &Lt. &Rt., and make sure that you are using the correct code page version of APSYMBOL.APS file.
The APSYMBOL.APS file, in the National Language Version of the OS/2 programming Tools package, is the default APSYMBOL.APS for each language, but you need to make sure you are using the valid file for the code page of IPF that you want to build. Since the APSYMBOL file is in a general text format, you can do so by browsing the APSYMBOL.APS file in the environment of that code page. If the characters and symbols in the file are displayed correctly, it means you are using the right file. Otherwise, you must find out the file named APSYMxxx.APS, where xxx is 932, 934..., the combined code page ID that you are looking for. If you find it, rename it to APSYMBOL.APS. Because the combined code page 93x and 94x share the same DBCS code page, they share the same APSYMBOL.APS file. For example, the code page 932 and 942 share the same file APSYM932.APS, and 938 and 948 share the same file APSYM938.APS.