System Administration Guide
Chapter 4, Managing printers and print jobs

Specifying character sets

Specifying character sets

For printers that allow selectable character sets, determine the names of the character sets and then map each set to a name or number in the terminfo database. 

To determine the names of the character sets listed in the terminfo database, enter: 

TERM=printer-type tput csnm 0

printer-type is the name of the printer type in question. This command should display the name of the 0th character set (the character set obtained by default after the printer is initialized).

To display the names of the other character sets, repeat the command above, replacing 0 with 1, 2, 3, and so on.

In general, the terminfo names should closely match the names used in the user documentation for the printer. However, because not all manufacturers use the same names, the terminfo names may differ from one printer type to the next.

To specify a list of character set names and to map them into terminfo names or numbers, enter:

/usr/lib/lpadmin -p printer_name -S characterset_list 

characterset_list is a list of names, separated by commas or spaces. Each item in the list is a character set name ``mapping'' (alias) that looks like one of the following:


N is a number between 0 and 63 that identifies the number of the character set in the terminfo database. characterset_name1 identifies the character set by its name in the terminfo database. In both instances, the name to the right of the equal sign (=) is the name you choose as an alias of the character set.

NOTE: You do not have to provide a list of aliases for the character sets if the terminfo names are adequate. You can refer to a character set by terminfo name, by number, or by your alias.

For example, your printer has two selectable character sets (sets #1 and #2) in addition to the standard character set (set #0). The printer type is 5310. Enter the following commands to determine the names of the selectable character sets:

TERM=5310 tput csnm 1
TERM=5310 tput csnm 2

The words ``english'' and ``finnish'', which are the names of the selectable character sets, are the output of the commands.

To change the names of the standard set and set #1, enter: 

/usr/lib/lpadmin -p printer_name -S "cs0=american, english=british"

A printer that has selectable character sets can accept any csN name or terminfo name known for the printer.

To remove the character set mappings, enter: 

/usr/lib/lpadmin -p printer_name -S none

See also: