]> git.armaanb.net Git - st.git/commit
Add support for multiple charset definitions
authorRoberto E. Vargas Caballero <k0ga@shike2.com>
Tue, 1 Oct 2013 19:23:11 +0000 (21:23 +0200)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Wed, 2 Oct 2013 19:22:15 +0000 (21:22 +0200)
commit7a4eefe87cb7661c8a77286d05b6c3afb467f806
tree9ecce302d1acd95238e312a315c211cce5bec4a3
parentc5c2365ab7c7ac2671b6e7d31cc9b0d41636393c
Add support for multiple charset definitions

vt100 has support for two defined charset, G0 and G1. Each charset
can be defined, but in each moment is selected only one of both
charset. This is usually used selecting a national charset in G0
and graphic charset in G1, so you can switch between graphic
charset and text charset without losing the national charset
already defined.

st hasn't support for national charsets, because it is an utf8
based terminal emulator, but it has support for graphic
charset because it is heavily used, but it only supports G0,
without understanding G1 selection sequences, which causes some
programs in some moments can print some garbage in the screen.

This patch adds a fake support for multiple charset definitions,
where we only support graphic charset and us-ascii charset, but
we allow more of one charset definition.

This patch allow define G0 until G3 charsets, but only accepts
select G0 or G1, and it accepts some national charset definitions
but all of them are mapped to us-ascii.
st.c