Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WHERE DIRECTIVE #1063

Open
xinjirufen opened this issue Jan 14, 2021 · 6 comments
Open

WHERE DIRECTIVE #1063

xinjirufen opened this issue Jan 14, 2021 · 6 comments

Comments

@xinjirufen
Copy link

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 xinjirufen changed the title WHERE WHERE DIRECTIVE Jan 14, 2021
@darold
Copy link
Owner

darold commented Jan 14, 2021

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

@xinjirufen
Copy link
Author

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

There was no error, just no data was exported

@xinjirufen
Copy link
Author

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

@darold
Copy link
Owner

darold commented Jan 14, 2021

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.

@xinjirufen
Copy link
Author

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

@darold
Copy link
Owner

darold commented Jan 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants