ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

WHERE DIRECTIVE

Open xinjirufen opened this issue 4 years ago • 6 comments

Hi,darold Dose the 'WHERE' directive support Chinese characters。I've tried it and found it doesn't support。 ora2pg.conf like this: ora2pg.txt

xinjirufen avatar Jan 14 '21 08:01 xinjirufen

Do you have an error reported by Ora2Pg or just no row returned?

darold avatar Jan 14 '21 09:01 darold

Do you have an error reported by Ora2Pg or just no row returned?

There was no error, just no data was exported

xinjirufen avatar Jan 14 '21 09:01 xinjirufen

Do you have an error reported by Ora2Pg or just no row returned?

There was no error, just no data was exported

My environment: oracle 12c standard ora2pg v21

xinjirufen avatar Jan 14 '21 09:01 xinjirufen

What does the following commands returns?

ora2pg -t SHOW_ENCODING -c config/ora2pg.conf

and

file config/ora2pg.conf

change the path to the configuration file following your installation.

darold avatar Jan 14 '21 09:01 darold

What does the following commands returns?

ora2pg -t SHOW_ENCODING -c config/ora2pg.conf

and

file config/ora2pg.conf

change the path to the configuration file following your installation.

ora2pg -t SHOW_ENCODING -c config/ora2pg.conf

WARNING: target PostgreSQL version must be set in PG_VERSION configuration directive. Using default: 11 Current encoding settings that will be used by Ora2Pg: Oracle NLS_LANG AMERICAN_AMERICA.AL32UTF8 Oracle NLS_NCHAR AL32UTF8 Oracle NLS_TIMESTAMP_FORMAT YYYY-MM-DD HH24:MI:SS Oracle NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS PostgreSQL CLIENT_ENCODING UTF8 Perl output encoding '' Showing current Oracle encoding and possible PostgreSQL client encoding: Oracle NLS_LANG AMERICAN_AMERICA.AL32UTF8 Oracle NLS_NCHAR AL32UTF8 Oracle NLS_TIMESTAMP_FORMAT YYYY-MM-DD HH24:MI:SS Oracle NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS PostgreSQL CLIENT_ENCODING UTF8

file config/ora2pg.conf

UTF-8 Unicode text

xinjirufen avatar Jan 14 '21 09:01 xinjirufen

Yes, I have the same problem here with character with french accent. This is clearly an encoding issue, I don't know what Oracle is expecting through OCI but the comparison is failing. I have tried several encoding values for NLS_LANG or locale without success, finding the solution could take time you'd better use an other column with numbers or ANSI C characters, if possible of course.

darold avatar Jan 15 '21 13:01 darold