Ubuntu终端突然不能输入中文

1. 问题

没有做任何输入法配置的修改,终端下输入中文后,选择对应项在terminal上无法显示,复制粘贴也不行。

2. 解决方案

使用了参考博客中的方法解决了问题,在此记录一下。
我是直接在/etc/inputrc中直接进行的修改,上面两行为原有的,下面两行为添加和放开的,之后重启系统解决了问题。

# Be 8 bit clean.
set input-meta on
set output-meta on

# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.

set meta-flag on
set convert-meta off

3. 其他

# 在inputrc中添加如下4行可以增加使用上下键自动根据历史补全输入
"\e[A": history-search-backward 
"\e[B":history-search-forward 
set show-all-if-ambiguous on 
set completion-ignore-case on
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章