After setting user language to Chinese with GB18030 encoding in SMIT, the following env variable were added to the user's .profile:


But when I run perl, it give me this warning:

perl: warning: setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = (unset),
     LC_FASTMSG = "true"
     LC_MESSAGE = "%l.%c"
     LANG = "Zh_CN"

How to fix this?

  • Is that the entire error message? "Please check that your locale settings" what? Could it need you to also set LC_ALL? – terdon Nov 28 '14 at 9:18
  • @terdon Perl's message goes on for an extra two lines after that (“are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").”) but the question contains all the relevant information. Setting LC_ALL is most definitely not necessary. – Gilles 'SO- stop being evil' Nov 29 '14 at 20:38
  • Is %l.%c a valid locale setting on AIX? I'm not familiar with that syntax, but I'm no AIX expert. Could you point to the documentation about this feature? – Gilles 'SO- stop being evil' Nov 29 '14 at 20:39

One piece of documentation I could find says only:


    Specifies the locale to use for LC_MESSAGES category information. The
    LC_MESSAGES category determines rules governing affirmative and
    negative responses and the locale (language) for messages and menus.

I could not find any documentation that mentions that "%l.%c" (presumably for "locale" and "charset"?) are acceptable. It may be a good idea to try setting both LANG and LC_MESSAGES to zh_CN instead of their current values (note the case).

 LC_FASTMSG = "true"
 LC_MESSAGE = "%l.%c"

Those both appear undocumented; according to the documentation I linked to above the proper names are LC__FASTMSG (two underscores) and LC_MESSAGES (plural).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.