11

How do I determine the default character encoding in a RedHat system using the command line? I just want to know what encoding a Java app would use per default if none is specified

victor hugo
  • 558
  • 3
  • 8
  • 15

2 Answers2

13

The locale command holds the key to these secrets.
(There are probably other RedHat-specific ways to do this, but locale will work on pretty much any *NIX system.)

voretaq7
  • 79,345
  • 17
  • 128
  • 213
4

I had problem with ISO-8859-1 files in a server UTF-8 and I was force to change

You can see de default language using the command:

echo $LANG

Edit the file: /etc/sysconfig/i18n and modify the property. See the example bellow:

LANG="pt_BR.ISO-8859-1"

Wender
  • 141
  • 2