Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7971779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:42:36+00:00 2026-06-04T07:42:36+00:00

Servers on unix machine are always using en as default locale. Following is locale

  • 0

Servers on unix machine are always using en as default locale.
Following is locale output

 LANG=en_US
 LC_CTYPE="C"
 LC_NUMERIC="C"
 LC_TIME="C"
 LC_COLLATE="C"
 LC_MONETARY="C"
 LC_MESSAGES="C"
 LC_ALL=C

I just don’t understand if LANG is set correctly then why servers starts with en locale.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:42:36+00:00Added an answer on June 4, 2026 at 7:42 am

    In Linux/Unix/Mac, the settings LC_ALL and LANG can control the default locale for Java programs. In Windows, the locales are set from the Control Panel, under Regional and Language Options.

    When the JVM starts in a *nix environment, it will do this:

    • Scan the environment for LC_ALL
    • If LC_ALL doesn’t exist, scan the environment for LANG
    • If the JVM setting user.language is set, use that in place of the environment variables.
    • If nothing is set, default to en_US (I believe this is the final failure case)

    In your environment, you have LC_ALL set to C, which is just the C locale. It’s basically a traditional fallback to the days when locales weren’t used.

    You can change LC_ALL in your case, and restart your JVM, and you should get a new value for java.util.Locale.getDefault().

    Example:

    import java.util.Locale;
    
    public class LocaleTest {
       public static void main(String[] args) {
          System.out.println(Locale.getDefault());
       }
    }
    

    Here’s running:

    > LC_ALL=en_UK java LocaleTest
    en_UK
    
    > LC_ALL=ja_JP java LocaleTest
    ja_JP
    

    Also note that if you’re running Java 1.7.0-b147, there is a bug with the JRE not recognizing environment settings for locale, and will always use the default system locale.

    Bug report here: https://bugs.java.com/bugdatabase/view_bug?bug_id=7073906

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the embedded jetty. I have it deployed on a unix machine,
I have a few test databases in some Unix SUSE 8 servers and initially
I access my Unix server via ssh and I always do the same commands.
I have created a repository on Unix server and trying to connect it using
I am on a Windows Vista 64-bit Enterprise machine with Subsystem for Unix Applications
I am using the same php code I have always used to try and
In network programming in unix, I have always set the SO_REUSEADDR option on the
I am trying to run an application on multiple (~20) Unix servers. Rather than
I am testing with MySQL on my home machine using an Apache server under
I am developing a web app using Kohana 3.2 with the following modules loaded:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.