|
|
This section describes how to perform code set mappings on the STREAMS- based TTY line of your terminal or printer. (This can be used for peripherals that use a different code set than the one used internally.)
Once the KBD module is configured in your STREAM, you must make sure that any mapping tables you require are loaded. Tables are loaded using the kbdload command.
For example: this command loads the 88591.cpz map:
kbdload /usr/lib/kbd/88591.cpz
To determine the code set mapping currently
used on your terminal, enter:
kbdset -q
This will display the currently loaded code set mapping tables and those that are attached to the input and output sides of your terminal's STREAM. A typical output generated by kdbset -q is shown below:
Timers: In = 20 ; Out = 20 ID Name Size I/O Ref Cmp Type d108d980 88591.cpz 123 - - 2 - pri d108a564 646ES.88591.d 410 - - 0 - pub d108a980 88591.646ES.d 421 - - 0 - pub d108b100 646ES.88591.d.c 223 - - 0 - pubThis shows that there are three code set mapping tables publicly loaded and one privately loaded.
Code set mapping tables may be attached to either or both of the input and output side of a STREAM.
To attach a code set mapping to the input side of the STREAM, type
kbdset -a map_name
where map_name is the name of the code set mapping table. To attach a code set mapping table to the output side of the STREAM, replace the kbdset option -a with -oa.
To detach a code set mapping table from the input side of the STREAM, type
kbdset -d map_name
where map_name is the name of the code set mapping table. Again, to detach a code set mapping table from the output side of the STREAM, replace the kbdset option -d with -od.
For example, to map an internal code set, ISO 8859-1, to the Spanish
ISO 646 national variant (646ES) using the default mapping type:
kbdset -a 646ES.88591.d
kbdset -oa 88591.646ES.d
This attaches maps to both the input and output sides of the STREAM to make the mapping transparent to the user.
Remember, these mappings must be loaded using the kbdload command, or must be publicly loaded by the super-user before they can be attached.