Support for Escape Sequences

Oracle GoldenGate supports the use of an escape sequence to represent a string column, literal text, or object name in the parameter file. You can use an escape sequence if the operating system does not support the required character, such as a control character, or for any other purpose that requires a character that cannot be used in a parameter file.

An escape sequence can be used anywhere in the parameter file, but is particularly useful in the following elements within a TABLE or MAP statement:

  • An object name

  • WHERE clause

  • COLMAP clause to assign a Unicode character to a Unicode column, or to assign a native-encoded character to a column.

  • Oracle GoldenGate column conversion functions within a COLMAP clause.

Oracle GoldenGate supports the following types of escape sequence:

  • \uFFFF Unicode escape sequence. Any UNICODE code point can be used except surrogate pairs.

  • \377 Octal escape sequence

  • \xFF Hexadecimal escape sequence

The following rules apply:

  • If used for mapping of an object name in TABLE or MAP, no restriction apply. For example, the following TABLE specification is valid:

    TABLE schema."\u3000ABC";
    
  • If used with a column-mapping function, any code point can be used, but only for an NCHAR/NVARCHAR column. For an CHAR/VARCHAR column, the code point is limited to the equivalent of 7-bit ASCII.

  • The source and target data types must be identical (for example, NCHAR to NCHAR ).

  • Begin each escape sequence with a reverse solidus (code point U+005C), followed by the character code point. (A solidus is more commonly known as the backslash symbol.) Use the escape sequence, instead of the actual character, within your input string in the parameter statement or column-conversion function.

Note:

To specify an actual backslash in the parameter file, specify a double backslash. For example, the following finds a backslash in COL1: @STRFIND (COL1, '\\' ).

To Use the \uFFFF Unicode Escape Sequence

  • The \uFFFF Unicode escape sequence must begin with a lowercase u, followed by exactly four hexadecimal digits.

  • Supported ranges are as follows:

    • 0 to 9 (U+0030 to U+0039)

    • A to F (U+0041 to U+0046)

    • a to f (U+0061 to U+0066)

\u20ac is the Unicode escape sequence for the Euro currency sign.

Note:

For reliable cross-platform support, use the Unicode escape sequence. Octal and hexadecimal escape sequences are not standardized on different operating systems.

To Use the \377 Octal Escape Sequence

  • Must contain exactly three octal digits.

  • Supported ranges:

    • Range for first digit is 0 to 3 (U+0030 to U+0033)

    • Range for second and third digits is 0 to 7 (U+0030 to U+0037)

      \200 is the octal escape sequence for the Euro currency sign on Microsoft Windows

To Use the \xFF Hexadecimal Escape Eequence

  • Must begin with a lowercase x followed by exactly two hexadecimal digits.

  • Supported ranges:

    • 0 to 9 (U+0030 to U+0039)

    • A to F (U+0041 to U+0046)

    • a to f (U+0061 to U+0066)

\x80 is the hexadecimal escape sequence for the Euro currency sign on Microsoft Windows 1252 Latin1 code page.