8

I usually config my ubuntu via

sudo locale-gen --purge en_US.UTF-8

And I've the installed locales

# locale -a
C
C.UTF-8
en_US.utf8
POSIX

Is it okay since I am missing en_US?

Howard
  • 2,005
  • 11
  • 47
  • 70

2 Answers2

14

Yes, you're probably quite fine. Assuming en_US.utf8 contains a UTF-8 American/English locale, it should work just fine. That's what I use myself:

% echo $LANG
en_US.UTF-8

If you run locale -v -a, it'll be a bit more descriptive:

% locale -v -a
locale: en_US           archive: /usr/lib64/locale/locale-archive
-------------------------------------------------------------------------------
    title | English locale for the USA
   source | Free Software Foundation, Inc.
  address | http://www.gnu.org/software/libc/
    email | bug-glibc-locales@gnu.org
 language | English
territory | USA
 revision | 1.0
     date | 2000-06-24
  codeset | ISO-8859-1

locale: en_US.utf8      archive: /usr/lib64/locale/locale-archive
-------------------------------------------------------------------------------
    title | English locale for the USA
   source | Free Software Foundation, Inc.
  address | http://www.gnu.org/software/libc/
    email | bug-glibc-locales@gnu.org
 language | English
territory | USA
 revision | 1.0
     date | 2000-06-24
  codeset | UTF-8

The only difference between en_US and en_US.utf8 is that the former uses ISO-8859-1 for a character set, while the latter uses UTF-8. Prefer UTF-8. The only difference in these is in what characters they are capable of representing. ISO-8859-1 represents characters common to many Americans (the English alphabet, plus a few letters with accents), whereas UTF-8 encodes all of Unicode, and thus, just about any language you can think of. UTF-8, today, is a defacto standard encoding for text. (Which is why you should prefer it.)

Thanatos
  • 356
  • 2
  • 11
-3

en_US.utf8 contains everything ASCII does but I don't think it covers any more than that. Your system won't be able to print/view characters other than those and will display a box (or a box with a question mark in it) when it encounters one of these unknown characters.

JeffW
  • 11
  • 1
  • Gonna explain why you got downvoted. en_US.utf8 means an english language interface/localization with unicode support. utf-8 supports far more than just ASCII. – Wyatt Ward Feb 03 '16 at 14:38