Printer code page translation tables for multibyte code sets

A translation table consists of maps between code points that are not shared by the two code sets.

A printer backend can communicate with other code sets even if the code set is not supported by the iconv subroutine by using a translation table provided in the /usr/lib/lpd/pio/transJP directory.

When an input or an output code set is not supported by the iconv subroutine, the unsupported code set translates one of the code sets that are supported or directly to a process code set using the translation tables found in the /usr/lib/lpd/pio/transJP directory. Users with root authority can add new code sets for printers by creating translation tables.

The naming convention for new translation tables is FromCodeSetName_ToCodeSetName. All translation tables must be defined in the trans_dir file. The f_cp from code point in a translation table must be sorted in alphabetical order in advance.

The trans_dir and codeset.alias files are in the /usr/lib/lpd/pio/transJP directory. The trans_dir file format is:

FromCodeSetName ToCodeSetName NameofTranslationFile

Code set aliases are defined in the codeset.alias file. The codeset.alias file format is:

CodeSetName AliasName ...

For example, to print an MBCS file that was written with a new code set on an IBM-943 printer, use the following steps:

  1. Create a translation table in the /usr/lib/lpd/pio/transJP directory. The naming convention for the new file is NewCodeSetName_IBM-943.
  2. Define the translation table in the trans.dir file. The format to define a new code set named NewCodeSet is:
    newcodeset IBM-943 newcodeset_IBM-943
  3. Define the alias name in the trans.alias file, if needed.
  4. Append the code set name as input code in a colon file, for example:
    ::Ti::[NewCodeSetName, ...]IBM-943, ...