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 Packed (the KS C 5601-1987 version of Combination code) format files.
# lpadmin -p lp1 -v /dev/ttya -I PACK # accept lp1 # enable lp1 |
The following command sequence tells LP that printer lp1 accepts only Johap (the KS C 5601-1992 version of Combination code) format files.
# lpadmin -p lp1 -v /dev/ttya -I JOHAP # accept lp1 # enable lp1 |
The above command lines also install printer lp1 on port ttya. See the lpadmin(1) man page for more information.
An lpfilter command line such as the following can be used to print files whose formats are not supported by the printer:
# lpfilter -f filter-name -F pathname |
The above command tells LP that a converter called filter-name (for example comptopack) is available through the filter description file named pathname. The content of pathname can be as follows:
Input types: simple Output types: PACK Command: comptopack |
The above filter takes default type file input and converts it to Packed format by using comptopack.
Input types: simple Output types: JOHAP Command: wansungtojohap |
The above filter takes the default type file input and converts it to Johap format using wansungtojohap.
To print an EUC file, use the following command:
system% lp euc-filename |
To print a Packed format file, use the following command:
system% lp -T PACK PACK-filename |
To print a Johap format file, use the following command:
system% lp -T JOHAP JOHAP-filename |
To print a ko.UTF-8 file to an EUC printer, type the following commands:
The first line converts the file to an EUC file. The output will be missing any characters that are not defined in EUC.
system% iconv -f ko_KR-UTF-8 -t ko_KR-euc ko.UTF-8_filename >euc-filename system% lp euc-filename |
The first line converts the file to a Johap file.
system% iconv -f ko_KR-UTF-8 -t ko_KR-johap92 ko.UTF-8_filename > johap92-filename system% lp johap92-filename |