Syntax:
XC={,,charset-mapping}
charset-mapping := designator template{,mapping}
mapping := char-to-be-mapped template-arg
A charset-mapping maps characters in font designator (B
: Ascii,
A
: UK, K
: german, etc.) to strings.
mapping describes a single character and the string it is to be translated to.
A template mechanism is used, as most codes have similarities. (for example strings to switch to and from another charset).
Each occurrence of %
in template is substituted with the template-arg specified together
with the character.
If your strings are not similar use %
as a template and place the full string in template-arg.
The \
character "escapes" the special characters \
, %
, and ,
.
example:
termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'For hp700 terminal, translate ISOlatin1 (charset
B
) that has a german charset(K
\304 ; 0xC4; Ä
gets translated to \E(K[\E(B
and so on.\
.
A mapping that translates the unquoted %
char, it will be sent to the terminal whenever screen switches to the corresponding
designator.
In this special case the template is assumed to be just %
because the
charset switch sequence and the character mappings normally haven't much in common.
With xterm, the german (K
) charset
\E(B
will be sent to the terminal, i.e. the ASCII charset is used instead.
The template is %
, so the mapping is straightforward:
[
to \304,
\
to \326, and
]
to \334.
termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'