开心得写代码,结果用Docker部署发现中文全是问号。。。

调了半天编码,最后发现不是代码得问题。。坑爹。。

dokcer 的 centos镜像不带中文,时区也不是中国,所以要自己设置。。

 

#设置时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo 'Asia/Shanghai' >/etc/timezone

#设置编码为中文

yum -y install kde-l10n-Chinese glibc-common

LANG="zh_CN.UTF-8"

echo "export LC_ALL=zh_CN.UTF-8"  >>  /etc/profile

 

相关文章:

  • 2021-07-16
  • 2021-11-25
  • 2021-12-30
  • 2022-02-13
  • 2021-07-28
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
  • 2021-12-28
  • 2022-12-23
  • 2021-05-01
  • 2021-12-27
相关资源
相似解决方案