在终端窗口中运行locale -av
给出了我(仅显示前两项输出):
locale: en_AG archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | English language locale for Antigua and Barbuda
source | Free Software Foundation, Inc.
address | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
email | [email protected]
language | English
territory | Antigua and Barbuda
revision | 1.0
date | 2008-09-16
codeset | UTF-8
locale: en_AG.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | English language locale for Antigua and Barbuda
source | Free Software Foundation, Inc.
address | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
email | [email protected]
language | English
territory | Antigua and Barbuda
revision | 1.0
date | 2008-09-16
codeset | UTF-8
en_AG
locale和之间有什么区别en_AG.utf8
?- 为什么语言环境
en_AG
使用 UTF-8 代码集,即使其名称中没有代码集修饰符?
答案1
当您通过名称指定区域设置时language_COUNTRY
,您实际上指定了定义为的区域设置之一language_COUNTRY.codeset
:该语言和国家/地区的默认区域设置。在 的情况下en_AG
,默认代码集似乎是 UTF8。对于en_US
,它是 ISO-8859-1,因此en_US
实际上相当于en_US.ISO-8859-1
。