移植dns查询工具dog的--tcp功能 (#652)

* add dog, modify user/Makefile and user.sysconfig

* add dog, modify user/Makefile and user.sysconfig

* fix tty unicode

* 修正无法正确编译dog的问题

---------

Co-authored-by: val213 <val213666@gmail.com>
Co-authored-by: GnoCiYeH <heyicong@dragonos.org>
Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
Val213
2024-03-25 13:04:53 +08:00
committed by GitHub
parent 911132c4b8
commit 7c958c9ef0
8 changed files with 86 additions and 48 deletions

View File

@ -347,7 +347,7 @@ impl VirtualConsoleData {
/// !!! 注意该函数返回true时元组的第一个数据是无效数据未转换完成
fn translate_unicode(&mut self, c: u32) -> (Option<u32>, bool) {
// 收到的字符不是首个
if (c & 0xc8) == 0x80 {
if (c & 0xc0) == 0x80 {
// 已经不需要继续的字符了,说明这个字符是非法的
if self.utf_count == 0 {
return (Some(0xfffd), false);