VT\-IS\-UTF8Section: Linux User's Manual (1)
Updated: 10 Aug 1998
Return to Main Contents
NAMEvt-is-UTF8 - check whether current VT is in UTF8- or byte-mode.
SYNOPSISvt-is-UTF8 [-h|--help] [-V|--version] [-q|--quiet]
DESCRIPTIONvt-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.
BUGSThe check should be done by directly asking the kernel, which is not possible as of kernels 2.0.x.
As of kernel 2.0.35, the byte-mode is sometimes erroneously detected as UTF8-mode, after switching from a 512-chars font to a 256-chars font. This is probably a console-driver bug.
This document was created by man2html, using the manual pages.
Time: 18:14:10 GMT, May 24, 2013