• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Add/Remove Locale Archive in CentOS/RHEL 5,6

by admin

Occasionally the locale archive file(/usr/lib/locale/locale-archive) does not include a locale you want to use. In this case, you need to create a new locale file, or compile the locale from existent one by:

# localedef -f [charmapfile] -i [inputfile] [outputpath]

for example:

# localedef -f SHIFT_JIS -i ja_JP ja_JP.SJIS

The warning message “not ASCII compatible, locale not ISO C compliant” can be ignored. This command can provide appropriate locale even if you get the warning message when running the command above. The message means that “some characters (which are provided by converting ASCII to the locale you mentioned) is not equal to the codes which are converted to UCS-4. For example, ‘\’ and ‘^’ is the typical characters which are UCS-4 in-compatible(‘\’ is 0x00a5 and ‘^’ is 0x203e in UCS-4, although ‘\’ is 0x5c and ‘^’ is 0x7e in ASCII).

You can now use the new locale ja_JP.SJIS. You can check whether the locale is applied to the locale-archive by:

# localedef --list

The listed locale could be lower-case, different from actual locale name. Please note that new locale could change text character processing rule. In this case, you might need to remove the locale from locale-archive by:

# localedef --delete-from-archive [existent_locale_listed_in_localedef--list]

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, Fedora, Linux

Some more articles you might also be interested in …

  1. amass viz – Visualize gathered information in a network graph (Command Examples)
  2. How to enable/disable wayland on Ubuntu 20.04
  3. How to Change Password Of An LXC Container User Account
  4. sam Command Examples in Linux
  5. CentOS / RHEL 7 : GRUB2 configuration file /boot/grub2/grub.cfg explained
  6. How to disable FIPS mode on CentOS/RHEL 7
  7. “yum history” command examples to display, rollback, redo, undo yum transactions
  8. CentOS / RHEL : iptables troubleshooting guide
  9. btrfs check Command Examples in Linux
  10. atool: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “az storage blob” Command Examples (Manage blob storage containers and objects in Azure)
  • “az storage account” Command Examples (Manage storage accounts in Azure)
  • “az sshkey” Command Examples (Manage ssh public keys with virtual machines)
  • “az redis” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright