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
-
WHEREclause -
COLMAPclause 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
COLMAPclause.
Oracle GoldenGate supports the following types of escape sequence:
-
\uFFFFUnicode escape sequence. AnyUNICODEcode point can be used except surrogate pairs. -
\377Octal escape sequence -
\xFFHexadecimal escape sequence
The following rules apply:
-
If used for mapping of an object name in
TABLEorMAP, no restriction apply. For example, the followingTABLEspecification is valid:TABLE schema."\u3000ABC";
-
If used with a column-mapping function, any code point can be used, but only for an
NCHAR/NVARCHARcolumn. For anCHAR/VARCHARcolumn, the code point is limited to the equivalent of 7-bit ASCII. -
The source and target data types must be identical (for example,
NCHARtoNCHAR). -
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
\uFFFFUnicode escape sequence must begin with a lowercaseu, followed by exactly four hexadecimal digits. -
Supported ranges are as follows:
-
0to9(U+0030toU+0039) -
AtoF(U+0041toU+0046) -
atof(U+0061toU+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
0to3(U+0030toU+0033) -
Range for second and third digits is
0to7(U+0030toU+0037)\200is the octal escape sequence for the Euro currency sign on Microsoft Windows
-
To Use the \xFF Hexadecimal Escape Eequence
-
Must begin with a lowercase
xfollowed by exactly two hexadecimal digits. -
Supported ranges:
-
0to9(U+0030toU+0039) -
AtoF(U+0041toU+0046) -
atof(U+0061toU+0066)
-
\x80 is the hexadecimal escape sequence for the Euro currency sign on Microsoft Windows 1252 Latin1 code page.