Simplified Chinese Solaris User's Guide

Using the EUC to GB Code Filters

A printer that does not support EUC needs filters that convert EUC files for printing. Use the commands in this section to print EUC files to non-EUC printers.

The following commands install the printer lp1 on port ttya. The commands signal the print service that lp1 accepts only GB format files.


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

See the lpadmin(1M) man page for more information.

You can use an lpfilter command shown in the following example to print files with formats that are not supported by the printer. The command line signals the print service that a converter called filter-name is available through the filter description file named in pathname.


# lpfilter -f filter-name -F pathname

The following example shows the output of pathname for a converter called euctogb. The pathname filter converts the default input type to GB with the euctogb converter.


Input types: simple
Output types: GB
Command: euctocgb

To print an EUC file, use a command line such as the following.


system% lp EUC-filename

To print a GB format file, use a command line such as the following.


system% lp -T GB GB-filename