Locale

語言環境 en_AG 和 en_AG.utf8 有什麼區別?

  • June 19, 2015

在終端視窗中執行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 | bug-glibc-locales@gnu.org
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 | bug-glibc-locales@gnu.org
language | English
territory | Antigua and Barbuda
revision | 1.0
    date | 2008-09-16
 codeset | UTF-8
  • localeen_AG和有什麼區別en_AG.utf8
  • 為什麼語言環境en_AG使用 UTF-8 程式碼集,即使其名稱中沒有程式碼集修飾符?

當您通過 name 指定區域設置時language_COUNTRY,您實際上指定了定義為的區域設置language_COUNTRY.codeset之一:該語言和國家/地區的預設設置。在 的情況下en_AG,預設程式碼集似乎是 UTF8。對於en_US,它是 ISO-8859-1,因此en_US 實際上等同於en_US.ISO-8859-1

引用自:https://unix.stackexchange.com/questions/210898