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


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.)


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:


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.