ora2pg (Unicode surrogate U+DBC0 is illegal in UTF-8)

107 Views Asked by At

I am extracting data using ora2pg from Oracle and get the below warning.

Unicode surrogate U+DBC0 is illegal in UTF-8 at /usr/lib64/perl5/IO/Handle.pm line 420.721 (1800 recs/sec)
Unicode surrogate U+DF72 is illegal in UTF-8 at /usr/lib64/perl5/IO/Handle.pm line 420.
Unicode surrogate U+DBC0 is illegal in UTF-8 at /usr/lib64/perl5/IO/Handle.pm line 420.
Unicode surrogate U+DF72 is illegal in UTF-8 at /usr/lib64/perl5/IO/Handle.pm line 420.
Unicode surrogate U+DBC0 is illegal in UTF-8 at /usr/lib64/perl5/IO/Handle.pm line 420.721 (1802 recs/sec)

and upon import i get this error.

FATAL: ERROR: invalid byte sequence for encoding "UTF8": 0xed 0xaf 0x80

I've imported it directly using PG_DSN and not to a file but that didn't help either.

[========================>] 1/1 tables (100.0%) end of scanning.
DBD::Pg::db pg_putcopyend failed: ERROR: invalid byte sequence for encoding "UTF8": 0xed 0xaf 0x80cs/sec)
CONTEXT: COPY phy_t1, line 1131 at /var/lib/pgsql/PERL_DBI_DBD/lib64/perl5/Ora2Pg.pm line 14716.
FATAL: ERROR: invalid byte sequence for encoding "UTF8": 0xed 0xaf 0x80

When I use "iconv -f utf-16le -t UTF-8//TRANSLIT out.sql -o PHYCON_data.sql" I get "out of memory" error. I've even bumped work_mem from 4M to 200M but still get the below.

Any suggestions?

0

There are 0 best solutions below