How to set "C.utf8" locale in Red Hat Enterprise Linux?

Solution Verified - Updated -

Issue

  • Unable to set "C.utf8" locale in RHEL
  • How to set "C.utf8" locale in RHEL 6 and higher releases?
  • Get the error below error on the playbook run against RHEL 7 Managed Node.

    "/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (C.UTF-8)\r\n"
    

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 6
    • 7
    • 8
    • 9
  • Red Hat Satellite 6
  • glibc-common
  • Ansible Automation Platform 2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content