ubuntu终端中文显示问号或乱码或者存储汉字名文件显示问号解决办法

ubuntu终端中文显示问号或乱码或者存储汉字名文件显示问号解决办法:

1 sudo locale-gen zh_CN.UTF-8

root@iZ2zegomezxwu9ez7u5zm4Z:/datanew/static/uploads# sudo locale-gen zh_CN.UTF-8Generating locales (this might take a while)...
zh_CN.UTF-8... done
Generation complete.

 2 sudo vim /etc/profile

把以下代码加入

LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:en_US:en
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY=zh_CN.UTF-8
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
LC_ALL=

source /etc/profile

 

转载于:https://www.cnblogs.com/adamans/articles/10196209.html

你可能感兴趣的:(ubuntu终端中文显示问号或乱码或者存储汉字名文件显示问号解决办法)