Scroll to navigation

VT-IS-UTF8(1) Linux 使用者手冊 VT-IS-UTF8(1)

NAME

vt-is-UTF8 - check whether current VT is in UTF8- or byte-mode. 檢查當前VT是否處於VTF8模式或是位元組模式.

總覽

vt-is-UTF8 [-h|--help] [-V|--version] [-q|--quiet]

描述

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. vt-is-UTF8 檢查當前VT是否處於 UTF8 模式, 其方式是寫(並且隨後擦除) 一個 3 位元組的 UTF8 序列, 然後察看控制檯驅動展示了多少個字元.

A message telling in which mode the console is is then written to stdout (except if the --quiet option was given). 然後會在標準輸出上給出一個資訊, 指出控制檯所用模式(除非給出了 --quiet 選項).

If the --quiet option is not given, the value returned is 1 if an error occurs, else 0. 在有錯誤發生時, 如果沒有選取 --quiet 選項, 返回值將是 1 , 否則將是 0 .

選項

display version number, a short help message and exit. 展示版本號, 以及一個簡短的幫助資訊, 然後退出.

display version number and exit. 展示版本號然後退出.

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. 不在標準輸出上列印所處模式, 但是返回一個狀態, 對於 UTF8 模式該退出狀態為 1 , 而對於位元組模式該狀態為 0 . 如果發生錯誤, 也返回 0 , 並且送給標準錯誤一個資訊.

BUGS

The check should be done by directly asking the kernel, which is not possible as of kernels 2.0.x. 模式的檢查可能應該透過直接請求核心來進行, 但從核心 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. 從 2.0.35 的核心開始, 在做了從 512 字元字型到 256 字元字型的切換後, 位元組模式有時會被錯誤地認為是 UTF8 模式. 這或許就是一個控制檯驅動的 bug .

另見

unicode_start(1), unicode_stop(1).

本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh

10 Aug 1998 控制檯工具