Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
Is it bad that LANG and LC_ALL are empty when running `locale -a` on OS X Yosemite?

I use OS X Yosemite.

When I run locale I get this:

locale 
LANG= 
LC_COLLATE="C" 
LC_CTYPE="UTF-8" 
LC_MESSAGES="C" 
LC_MONETARY="C" 
LC_NUMERIC="C" 
LC_TIME="C" 
LC_ALL=

Question

Is the emptiness of LANG and LC_ALL bad/normal/prefered?

Normally, I wouldn't care that much about it, but I've got a warning

(process:16182): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

when I was using GTK (here's a link to my previous quesiton on this).

People have been struggling with this problem in many languages (Python for example) and different OS (Ubuntu for example).

The point is I couldn't find any solution for C language and OS X.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I would guess that the GTK warning is because GTK is actually trying to use the Mac language and locale settings from System Preferences to make a locale identifier string, using that string with setlocale(), and being told that the C library doesn't support that locale. As a result, it's defaulting to the "C" locale. If it weren't trying to find a better locale, there would be little reason to warn that it's using the "C" locale because that's what would be expected when LANG and LC_ALL are unset.

OS X has support for many languages and locales in the high-level frameworks (Cocoa, etc.), but not all of those are also supported at the level of the C library. What are the language and locale settings in System Preferences? What locale identifier would you expect for your language and locale? See if that's in the output from locale -a (or, similarly, if there's a directory for it in /usr/share/locale).

Another thing to check is Terminal's preferences. On the Settings pane, under the Advanced tab, is "Set locale environment variables on startup" set? If not, then those environment variables won't be set by default, which might explain what you're seeing. If the setting is enabled but you're still not getting those environment variables, that suggests that Terminal was not able to find a suitable C-library locale that matches your system settings.

Finally, you can simply try setting LANG to what you want to use. For example:

export LANG=pl_PL.UTF-8
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda