IBM Support

FAILED: Fetch statement failed: Encoding or code set not supported. error -79783

Troubleshooting


Problem

After JDBC upgrade to 3.50.JC1 onwards, customer who are using Multibyte codeset might received error such as : "FAILED: Fetch statement failed: Encoding or code set not supported. " error -79783

Symptom

Error message: "FAILED: Fetch statement failed: Encoding or code set not supported. "
error -79783

Cause

JDBC version 3.50.JC1 introduced the following APAR:
IC49877 -
JDBC DRIVER ALLOWS INSERTION OF INVALID CHARACTERS FOR CHARACTER SET.
http://www.ibm.com/support/docview.wss?uid=swg21502902
While the behavior for this APAR is correct, it might lead to problems for those customers who use Native Multibyte data on the application side but store them into en_us locale on the server side.

In some case, for customer who are using zh_tw.big5 locale on the server side; but stored illegal characters in the table will also be effected.

Diagnosing The Problem

Error message happened right after upgrade.

Resolving The Problem

Since version JDBC 3.50.JC5, user can set a flag IFX_USE_STRENC to switch to old style of encoding.

Here's an example on how to use it:
"jdbc:informix-sqli://inst:port:dbname:informixserver=XXX;user=informix;password=XX;DB_LOCALE=en_us.819;IFX_USE_STRENC=true;"

[{"Product":{"code":"SSVT2J","label":"Informix Tools"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Informix JDBC","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"3.5","Edition":"Rapid Development System;Compiler;Developer","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
20 January 2022

UID

swg21502902