Configuring your environment’s character set

By default, the Java Virtual Machine (JVM) under which a Replication Agent instance is running finds your system’s 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 1.4.2 JDK http://java.sun.com/j2se/corejava/intl/index.jsp.

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

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.

StepsTo override the system default character set for all instances

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

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

StepsTo override the system default character set for a Replication Agent instance

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

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

    set RA_JAVA_DFLT_CHARSET=charset
    

    For UNIX, edit the $SYBASE/RAX-15_0/<instance>/RUN_<instance>.sh batch file:

    RA_JAVA_DFLT_CHARSET=charset
    export RA_JAVA_DFLT_CHARSET
    

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

    NoteIn UNIX, spaces are not allowed on either side of the equals sign.

    For a list of valid Java character sets, see Supported Encodings on the Internationalization page under Documentation for the J2SE 1.4.2 JDK http://java.sun.com/j2se/corejava/intl/index.jsp.