Skip to Main Content
  • Questions
  • extproc, database characteset and server characterset

Breadcrumb

May 4th

Question and Answer

Sergiusz Wolicki

Thanks for the question, Ryan.

Asked: August 15, 2017 - 9:56 pm UTC

Last updated: August 16, 2017 - 2:56 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked


I am testing an external procedure on a shared database environment on a Linux cluster using LANG UTF8, all at 12.1.0.2
When calling a C library using extproc from a database using AL32UTF8 the call works as expected.
When calling a C library using extproc from a database using US7ASCII the call returns

ERROR at line 1:
ORA-20100: IOQDP3010E: Data Conversion failed, internal error code: 1610

Is there a parameter/environmental variable that needs to be set to allow this to work?

and we said...

The extproc procedures generally process text (VARCHAR2/CHAR/CLOB) in the database character set. It is possible that the called library requires a particular character set for processed data. In this case, you may need to do some conversion between the database character set and the required library character set. You may try setting the LANG variable to match the character set of processed data in the ENVS parameter in listener.ora. The possible values for LANG depend on your OS locale support (see: "locale -a" on Unix-like systems). However, this will not work if the C library ignores LANG and always expected, for example, UTF-8 text.

Note that "IOQDP3010E: Data Conversion failed, internal error code: 1610" is a user (application) error. It is not an Oracle Database error. As I do not know your extproc interface code nor the C library code, it is difficult to give a more reliable diagnosis of the problem.

It is kind of weird that you get an error with the US7ASCII database. US7ASCII is a subset of AL32UTF8, so any US7ASCII data is at the same time valid AL32UTF8 data. Therefore, any code expecting UTF-8 data should not complain when getting ASCII data. The error may indicate a separate problem in your US7ASCII database, which is the presence of illegal, non-ASCII character codes (bytes >127). You may use the Database Migration Assistant for Unicode (DMU, see: oracle.com/dmu) to scan your database for such codes.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database