-   Programming (
-   -   Changing encoding- Setting an environment variable.. (

rixride00 03-22-2004 09:05 AM

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?


ToniT 04-20-2004 04:25 AM

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.

All times are GMT -5. The time now is 01:52 PM.