【标题描述】【tty】TTY(Ctrl + Alt + F1~F6)下中文信息乱码 (系统已安装中文支持)
【环境信息】
硬件信息:
无特殊要求
软件信息:
OS版本: 22.03-LTS-SP1
内核信息: OLK-5.10
【问题复现步骤】
具体操作步骤
(1) 给服务器连接一个显示器
(2) 进入某个TTY终端(按Ctrl+Alt+F1~F6), 这里以tty1为例 (按Ctrl+Alt+F1)
[root@k8smaster0 ~]# tty
/dev/tty1
[root@k8smaster0 ~]#
(3) 设置语言为中文
[root@k8smaster0 ~]# export LANG=zh_CN.UTF-8
[root@k8smaster0 ~]# echo $LANG
zh_CN.UTF-8
[root@k8smaster0 ~]#
(4) 随意敲一个未知的命令, 此时bash会报错"未找到命令", 但报错信息却是方块状乱码.
出现概率 : 必现
【预期结果】
在TTY中应该能显示中文, 而不是乱码
[root@k8smaster0 ~]# jfksdf
-bash: jfksdf:未找到命令
[root@k8smaster0 ~]#
【实际结果】
中文部分的是乱码.
(如上述【问题复现步骤】步骤4的图所示)
Hi zhfzh1991, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @刘勇强 , @wangxiongfeng , @朱科潜 , @WangShaoBo , @lujialin , @Xu Kuohai , @冷嘲啊 , @Lingmingqiang , @yuzenghui , @juntian , @OSSIM , @陈结松 , @whoisxxx , @koulihong , @刘恺 , @hanjun-guo , @woqidaideshi , @Chiqijun , @Kefeng , @ThunderTown , @AlexGuo , @kylin-mayukun , @Zheng Zucheng , @柳歆 , @Jackie Liu , @zhujianwei001 , @郑振鹏 , @SuperSix173 , @colyli , @Zhang Yi , @htforge , @Yuehaibing , @xiehaocheng , @guzitao , @CTC-Xibo.Wang , @zhanghongchen , @chen wei , @Jason Zeng , @苟浩 , @DuanqiangWen , @georgeguo , @毛泓博 , @AllenShi , @zhangjialin , @Wei Li , @tcc@hello , @谭小飞 , @Fred Kimmy , @LiYihang , @young1c , @hucz , @WangBoe2022 , @chenke , @李力军 , @Yang Shen , @wsoydl , @sanglipeng , @zhangchangzhong , @jimmy_hero , @YGN-NDWD-Official , @Xie XiuQi , @zhengzengkai
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
这个需要添加中文支持补丁,社区有方案
https://github.com/zhmars/cjktty-patches
麒麟和统信发行版应该合入的就是这个补丁
我之前在 !1292:TTY: Fix the garbled displaying of Chinese text in TTY (Ctrl + Alt + F1~F6) 上回复了一下,最主要的原因就是:
不符合引入正式版本的条件
如果这个第三方补丁的 licence 是明确的 GPL 的,
并且如果有人或组织愿意维护这组补丁(作为tty 中文这个模块的 Committer)。
则可以讨论合入欧拉内核。
可以不从内核支持,安装zhcon程序进行核外支持,同意可以修复中文乱码的情况。
登录 后才可以发表评论