linux en

您所在的位置:网站首页 us和america linux en

linux en

2023-09-04 11:59| 来源: 网络整理| 查看: 265

同事反馈, 有台服务器python无法print中文. 最后查到是因为 LANG设置问题.

系统设置为: LANG="en_US", 修改成: LANG="en_US.utf8" . 问题解决.

操作系统: CentOS 7.x

配置文件 /etc/locale.conf

en_US 与 en_US.utf8 的区别是什么?

$ locale -v -a

locale: en_US archive: /usr/lib/locale/locale-archive

-------------------------------------------------------------------------------

title | English locale for the USA

source | Free Software Foundation, Inc.

address | http://www.gnu.org/software/libc/

email | [email protected]

language | American English

territory | United States

revision | 1.0

date | 2000-06-24

codeset | ISO-8859-1

locale: en_US.utf8 archive: /usr/lib/locale/locale-archive

-------------------------------------------------------------------------------

title | English locale for the USA

source | Free Software Foundation, Inc.

address | http://www.gnu.org/software/libc/

email | [email protected]

language | American English

territory | United States

revision | 1.0

date | 2000-06-24

codeset | UTF-8

即, en_US 会使用默认的字符集(codeset) ISO-8859-1, en_US.utf8使用的字符集为UTF-8.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3