By default, the Java Virtual Machine (JVM) under which a Replication Agent instance is running finds your system default character set. The type of character data that Replication Agent can handle is determined by the character set, also known as the encoding. Unless you want to override the default character set that the JVM finds on your system, you do not need to explicitly set the character set-related environment variable.
To support overriding the default character set, all of the executable scripts (or batch files) in the Replication Agent /bin directory, refer to an environment variable named RA_JAVA_DFLT_CHARSET. You can set this environment variable to use the character set you want. The character set you specify must be the character set configured on the primary database. For a list of valid Java character sets, see Supported Encodings on the Internationalization page under Documentation for the J2SE 5.0 JDK http://java.sun.com/javase/technologies/core/basic/intl/.
All Replication Agent instance RUN scripts also reference the RA_JAVA_DFLT_CHARSET environment variable.
If you are using Replication Server to replicate a number
of different character sets, you must configure it for UTF8.
You can override the system default character set by doing one of the following:
Set the value of a system variable named RA_JAVA_DFLT_CHARSET in your environment and use the ra utility to start the Replication Agent instance, or
Set the value of the RA_JAVA_DFLT_CHARSET variable in the Replication Agent instance RUN script and use the RUN script to start the Replication Agent instance.
If you start a Replication Agent instance by invoking the ra utility, you can override the value of the RA_JAVA_DFLT_CHARSET system variable in your environment to specify the character set.
If you start a Replication Agent instance by invoking the instance RUN script (or batch file), you can edit the instance RUN script to specify the default value of RA_JAVA_DFLT_CHARSET and specify the character set you want to use.
To override the system default character set for
all Replication Agent instances
Enter a character set value in the ra script:
For Windows, edit the %SYBASE%\RAX-15_1\bin\ra.bat file.
For UNIX, edit the $SYBASE/RAX-15_1/bin/ra.sh file:
RA_JAVA_DFLT_CHARSET=charset
Here, charset is the Java-supported encoding.
For example, ISO8859_1
or Cp1252
for
ISO-1 (also known as Latin-1), and ISO8859_8
or Cp1255
for
Hebrew.
In UNIX, spaces are not allowed
on either side of the equals sign. For a list of valid Java character
sets, see Character Encodings on the Internationalization page http://java.sun.com/javase/technologies/core/basic/intl/.
Uncomment the following lines of code:
For Windows:
set RA_JAVA_DFLT_CHARSET=charset
For UNIX:
RA_JAVA_DFLT_CHARSET=charset export RA_JAVA_DFLT_CHARSET
To override the system default character set for
a specific Replication Agent instance
Enter a character set value in the RUN script:
For Windows, edit the %SYBASE%\RAX-15_1\<instance>\RUN_<instance>.bat script:
For UNIX, edit the $SYBASE/RAX-15_1/<instance>/RUN_<instance>.sh batch file:
Here, charset is the Java-supported encoding.
For example, ISO8859_1
or Cp1252
for
ISO-1 (also known as Latin-1), and ISO8859_8
or Cp1255
for
Hebrew is supported.
In UNIX, spaces are not allowed
on either side of the equals sign. For a list of valid Java character
sets, see Character Encodings on the Internationalization pagehttp://java.sun.com/javase/technologies/core/basic/intl/.