Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-22-2004, 09:05 AM   #1
Registered: Mar 2004
Posts: 31

Rep: Reputation: 15
Changing encoding- Setting an environment variable..

I am trying to change the encoding but I don't know the command to do it.:
Red Hat 9
Mysql 4.0.1

Here is my error message:

Error: the encoding of your Java VM is different from the OpenCms encoding!

Java VM file encoding: UTF-8
OpenCms encoding: ISO-8859-1

To continue the setup process:
Change the encoding of your Java VM. To do that you must modify the file.encoding setting. Using Apache Tomcat, a different encoding can be set in the environment variable CATALINA_OPTS by the -D parameter e.g.:

If you want to use an encoding different from ISO-8859-1, you must also adjust the defaultContentEncoding setting in WEB-INF/config/
Unless you have specific encoding requirements, you should use the default ISO-8859-1 setting. Please refer to the Sun documentation for a list of supported encodings for your OS.

So I have tried

ln -s CATALINA_OPTS=-Dfile.encoding=ISO-8859-1

and I have tried:
export CATALINA_OPTS=-Dfile.encoding=ISO-8859-1

but it doesn't seem to be working am I doing it right?

Old 04-20-2004, 04:25 AM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
I don't know what program is saying this error message, but for java program, you can set this encoding by saying 'java -Dfile.encoding=ISO-8859-1 foo' where foo is the class you are going to run.

For linux environment, there is probably a line LANG=..., in /etc/environment, or similar (distribution spesific) that defines the default system encoding.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variable setting chii-chan Linux - General 5 01-23-2009 08:29 PM
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 02:58 PM
changing path environment variable iNET_boss Linux - Newbie 2 07-27-2005 05:35 PM
Setting up a environment variable Hiper1 Linux - Newbie 3 03-08-2005 09:43 AM
Setting an environment variable kharris Linux - General 3 10-02-2003 05:38 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration