My Oracle Support Banner

Character Conversion Issue When Replicating Data From Unicode Oracle To Unicode PostgreSQL (Doc ID 1543702.1)

Last updated on FEBRUARY 26, 2019

Applies to:

Oracle GoldenGate - Version 11.2.1.0.2 and later
Information in this document applies to any platform.

Symptoms

Multibyte characters not properly replicated between Oracle and Postgres when both databases are using Unicode character sets. For example the German extra character 'Ä' stored in the Oracle database is replicated into Postgres as 2 different characters 'Ã;' although the hex code of each character maches the hex code of the character stored in the Oracle database.

See the hex dump values below (Unicode hex value for 'Ä' is c384):

Oracle database:

SQL>  select col2, dump(col2,16) from <table> where col1=104;

COL2   DUMP(COL2,16)
------   --------------------------------------------------------------------------
Ä         Typ=1 Len=2: c3,84

 

Logdump output of the extract trail file:

2013/04/07 15:42:09.237.659 Insert               Len    21 RBA 1266
Name: <schema>.<table>
After  Image:                                             Partition 4   G  s
0000 0007 0000 0003 3130 3400 0100 0600 0000 02c3 | ........104.........
84                                                | .
Column     0 (x0000), Len     7 (x0007)
0000 0003 3130 34                                 | ....104
Column     1 (x0001), Len     6 (x0006)
0000 0002 c384                                    | ......

 so the content is also c384 in the extract file.

Postgres:

select "col2",ASCII(SUBSTRING("col2", 1, 1)), ASCII(SUBSTRING("col2", 2, 1)) from "<schema>"."<table>" where "col1"=104;
"col2"   ASCII(SUBSTRING("col2", 1, 1))  ASCII(SUBSTRING("col2", 2, 1))

   Ã;            195                                  132 

 

(where 195 decimal is c3hex and 132 decimal is 84hex)

 



Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.