Configuring your environment character set

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.

NoteIf 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:

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.

StepsOverriding the system default character set for all Replication Agent instances

  1. Enter a character set value in the ra script:

  2. Uncomment the following lines of code:

StepsOverriding the system default character set for a specific Replication Agent instance

  1. Enter a character set value in the RUN script:

    • For Windows, edit the %SYBASE%\RAX-15_2\<instance>\RUN_<instance>.bat script.

    • For UNIX, edit the $SYBASE/RAX-15_2/<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.