Traditional Chinese Solaris System Administrator's Guide

EUC to Big5 Filter

A printer that does not support EUC needs filters that convert EUC files for printing. For example, the following command sequence tells LP, the print service, that printer lp1 accepts only Big5 format files. This command line also installs printer lp1 on port ttya. The lpadmin(1) man page explains this command more fully.


# lpadmin -p lp1 -v /dev/ttya -I Big5
# accept lp1 
# enable lp1 

An lpfilter command line like the following can be used in the process of printing files whose format is not supported by the printer:


# lpfilter -f filter-name -F pathname 

The above command tells LP that a converter called filter-name (for example euctobig5) is available through the filter description file named pathname. This filter takes default type file input and converts it to Big5 format by using euctobig5. The content of pathname can be as follows:


Input types: simple
Output types: BIG5
Command: euctobig5 

To print an EUC format file, use the following command:


system% lp -d lp1 EUC-filename 

To print a Big5 format file, use the following command:


system% lp -d lp1 -T BIG5 Big5-filename