Locale en_AG vs en_AG.utf8 – Key Differences Explained

localeunicode

Running locale -av in the terminal window gives me (only showing first two items of output):

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
  • What is the difference beween locale en_AG and en_AG.utf8?
  • Why is locale en_AG using UTF-8 codeset, even though there is no codeset modifier in its name?

Best Answer

When you give a locale by the name language_COUNTRY, you actually specify one of the locales defined as language_COUNTRY.codeset: the default one for this language and country. In the case of en_AG, it appears that the default codeset is UTF8. For en_US, it is ISO-8859-1, and therefore en_US is in fact equivalent to en_US.ISO-8859-1.