Invalid byte sequence when importing Oracle BLOB

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Invalid byte sequence when importing Oracle BLOB
Date: 2021-04-26 11:49:18
Message-ID: d32bf7b4-88fb-96f2-6627-82a78f091e4f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

The source is an Oracle 12 db with this encoding:
NLS_LANG = AMERICAN_AMERICA.AL32UTF8
NLS_NCHAR = AL32UTF8

The destination is an (RDS) Postgresql 12.5 with encoding UTF8, and is being
loaded through COPY commands generated by ora2pg.

The source table has a BLOB column (I think they are scanned images) which
I'm loading into a Postgresql bytea column.

Seven times out of about 60M rows, I get this error:
Psql:909242: ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0xaf 0xbf

Is there anything I can change on the Postgresql side to make these records
import correctly?

--
Angular momentum makes the world go 'round.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mohan Radhakrishnan 2021-04-26 11:53:49 Re: BRIN index on timestamptz
Previous Message Matthias Apitz 2021-04-26 06:04:55 Re: client waits for end of update operation and server proc is idle