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 .
选项
- -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. 不在标准输出上打印所处模式, 但是返回一个状态, 对于 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 .
vt-is-UTF8 - check whether current VT is in UTF8- or byte-mode. 检查当前VT是否处于VTF8模式或是字节模式.的更多相关文章
- 响应消息的内容类型 text/html; charset=utf-8 与绑定(application/soap+xml; charset=utf-8)的内容类型不匹配。
问题表述: 响应消息的内容类型 text/html; charset=utf-8 与绑定(application/soap+xml; charset=utf-8)的内容类型不匹配. 说明: 此类问题当 ...
- 解决Qt中文乱码以及汉字编码的问题(UTF-8/GBK)——ubuntu环境设置默认是utf-8,文件编码可使用Encodersoft批量转换
一.Qt环境设置 文件从window上传到Ubuntu后会显示乱码,原因是因为ubuntu环境设置默认是utf-8,Windows默认都是GBK.Windows环境下,Qt Creator,菜单-&g ...
- php header utf8 插入header("Content-type: text/html; charset=utf-8");
PHP文件插入header("Content-type: text/html; charset=utf-8"); 相当于页面里面的<meta http-equiv=" ...
- Linux 环境下 javac 编译错误: 编码UTF8的不可映射字符 (编码UTF8/GBK的不可映射字符)
Linux 系统下一般默认使用UTF-8编码, 使用javac 编辑使用其他编码格式编写的源吗时,会出现 “ 错误: 编码UTF8的不可映射字符 ”. 最近在使用 javac 编译 一个在wind ...
- StreamWriter结合UTF-8编码使用不当,会造成BOM(Byte Order Mark )问题生成乱码(转载)
问: I was using HttpWebRequest to try a rest api in ASP.NET Core MVC.Here is my HttpWebRequest client ...
- [C/C++]_[Unicode转Utf8,Ansi转Unicode,Ansi文件转Utf8文件]
http://blog.csdn.net/infoworld/article/details/15337665 场景: 1.也就只有windows需要那么麻烦,还搞一个ANSI编码.学学mac os ...
- checking it the current os is a 32bit or 64bit version 检查操作系统是32位还是64位
) { Console.WriteLine("32bit os"); } ) { Console.WriteLine("64bit os"); }
- Geeks - Check whether a given graph is Bipartite or not 二分图检查
检查一个图是否是二分图的算法 使用的是宽度搜索: 1 初始化一个颜色记录数组 2 利用queue宽度遍历图 3 从随意源点出发.染色0. 或1 4 遍历这点的邻接点.假设没有染色就染色与这个源点相反的 ...
- EXCEL的导出
具体实现代码: protected void EXCEL_Click(object sender, EventArgs e) { ToExcel(GridView1); } public void T ...
随机推荐
- python操作xls表
1.python读取excel中单元格内容为日期的方式 python读取excel中单元格的内容返回的有5种类型,即上面例子中的ctype: ? 1 ctype : 0 empty,1 string, ...
- ELK日志分析平台.1-搭建
ELK日志分析平台.1-搭建 2017-12-28 | admin 一.简介1.核心组成 ELK由Elasticsearch.Logstash和Kibana三部分组件组成: Elastic ...
- Windows IIS7 下安装配置 PHP7.0
确认Microsoft Visual C++版本 Microsoft Visual C++的版本至关重要,根据Microsoft Visual C++版本下载的PHP不同. PHP官网的 ...
- centos7 安装python虚拟环境
本篇主要介绍centos7系统下,安装python3虚拟环境.环境:系统centos7,源代码安装python3,/usr/bin/python3为自己安装的. 安装支持包 yum install p ...
- mysql8的坑
plugin caching_sha2_password could not be loaded 我在mac上用Sequel Pro连数据库的时候,会报出以上错误,这是应为8.0.11把身份认证插件改 ...
- Java面试宝典(2)Java基础部分
31.String s = "Hello";s = s + " world!";这两行代码执行后,原始的String对象中的内容到底变了没有? 没有.因为Str ...
- 查看linux防火墙的状态
如有需要可以加我Q群[308742428]大家一起讨论技术,有偿服务. 后面会不定时为大家更新文章,敬请期待. 喜欢的朋友可以关注下.iptables防火墙1.基本操作 # 查看防火墙状态 servi ...
- Light项目---实现后端接口时遇见的一些问题
ImproperlyConfigured: WSGI application 'lightapi.wsgi.application' could not be loaded; 在moddleware中 ...
- No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command. gdb 1. 首先使用gcc -g .c文件 -o 可执行文 ...
- 【CSS】div的背景图完整图片覆盖
最初的代码: .container_first { width: 100%; height: 100%; background: url(10176581.jpg); background-size: ...