Printer code page translation for multibyte code sets
Multibyte code set (MBCS) translation from the print file to the code set differs from translation for single-byte code set (SBCS) code points.
Translation from print file to code set in multibyte environments is a two-stage process.
During the first stage of code-set translation, the input code set of the print file is translated to a process code set. The process code set must be one of the MBCS code sets supported by the iconv subroutine and locale database (DB). Examples include the IBM-943, IBM-eucTW, and IBM-eucKR code sets. During the second stage, the process code set is translated to an appropriate output code set for the printer. The iconv subroutine translates the code set, if the iconv converter for the translation exists. When the input or output code set and process code are the same, no code-set translation is performed.
The Ti and To attributes in the printer-dependent colon files define the possible flow of the translating code set. The Ti attribute specifies the combination of the input and process code sets:
[Input_code_set, ... ]Process_code_set, ...
The To attribute specifies the combination of the process and output code:
Process_code_set [Output_code_set0, Output_code_set1,
Output_code_set2, Output_code_set3,... ], ...
For example, the To attribute for a Japanese printer is defined as:
::To::IBM-943[IBM-932, IBM-932, IBM-932], ibm-eucJP[IBM-932,
IBM-932, IBM-932,IBM-932]
All characters of the character set ID (CSID) are printed using ROM fonts when an output code set is specified for each CSID. Otherwise, bitmap images from the Xwindows font are used. The type of Xwindows font files, including the font image of each CSID, is selected by reading a file from the /usr/lib/X11/nls directory.