vt-is-UTF81
Check whether current vt is in utf8- or byte-mode.
Usage
vt-is-UTF8 [{-h | --help}]
[{-V | --version}]
[{-q | --quiet}]
Overview
vt-is-UTF8 checks whether the current VT is in UTF8 mode, by writing (and erasing afterwards) a 3-byte-long UTF8 sequence, and looking how much chars where displayed by the console driver.
A message telling in which mode the console is is then written to stdout (except if the --quiet option was given).
If the --quiet option is not given, the value returned is 1 if an error occurs, else 0.
Options
-
-h --help -
display version number, a short help message and exit.
-
-V --version -
display version number and exit.
-
-q --quiet -
do not print on stdout in with mode we are, but return the state as exit-status 1 if in UTF8-mode, 0 if in byte-mode. In case of error, 0 is returned and a message is displayed on stderr.
Releases
8 releases since Debian 2.1 (Slink); the text changed 1 time.
--quiet since Debian 2.2 (Potato);
-q since Debian 2.2 (Potato).