Bug 6742

PowerBuilder vs Informix – characters in different coding than supported by the database 10 June, 2021

Jiri Ptacek
08 June, 2021
Product: PowerBuilder Category: DataWindow
Version: 2019 Build: 2170
Classification: Publishing: Public
Priority: P3
Status: Reproducing Reason:
Communication Status: Waiting for Appeon
Mark Lee @Appeon 10 June, 2021
#2
Hi Jiri,

Thanks for report the problem.
We will be working on analyzing/reproducing your case. 
We will keep you posted on the results here.

Regards,
Mark Lee
Chris Pollach @Appeon 08 June, 2021
#1
Hi Jiri;

  FYI: The Appeon Community has an interesting thread on PB based Informix drivers:
https://community.appeon.com/index.php/qna/q-a/pb-2019-and-informix-database-connection

  Since I do not have an Informix test machine, I will now transfer this ticket over to the main support team for their evaluation and testing of your issue. 

Regards ... Chris
Jiri Ptacek 08 June, 2021
Hi,
Informix database is set to code page CP-1250 for Czech characters. Code page of the client is also set to CP-1250.
In the database they have a parameter EILSEQ_COMPAT_MODE set to 0, this should call database error, in case someone will try to enter characters to the database, which do not correspond to CP-1250. This settings works with other technologies as expected except PB. In this case without any error/warning it will save CHAR value into the database with wrong character. This leads to problems with the next data processing. SELECT of this wrong data returns value '(err)'.
Connect string from Preview in Database Painter:
// Profile elektra_csobsp_9430
SQLCA.DBMS = "I10 INFORMIX-10.0"
SQLCA.Database = "csobsp_9430"
SQLCA.UserId = "aris"
SQLCA.DBPass = <*******>
SQLCA.ServerName = elektra.tc.local@elektra1
SQLCA.AutoCommit = False
SQLCA.DBParm = ""

The issue can be reproduced by the update of value with character chr(152) in the database.
In DatabasePainter it can be done by key sequence LEFT ALT + 0152. It is a char in a value for comment between characters a, b (in SQL session v DatabasePainter this char is not visible):
update eo_jmeno_cis SET poznamka = 'a˜b' where jm = 'Iva'

In database we can see char 152 (hexa 98)

They need to manage the situation where the user is not able to enter wrong chars to the database. Ideally they would like to manage it by settings EILSEQ_COMPAT_MODE = 0. As a good solution they would also accept to manage it by some setting in PB in case that the reason of this wrong behavior will not be fixed.
---------------------------
They have also an answer from IBM support:
------------------------------
We understand you are facing issues with 'Appeon Power Builder's native driver', this Driver belongs to 'Appeon'. So, could you Please raise a Ticket with 'Appeon Support'.
 
Informix Drivers (older) also allowed Illegal characters insertions, because there is No check done to verify the Characters during Insert in older versions. But now, in recent Informix version each Character Insertions are matched with the Character set of Locale and so you see a Error while inserting Illegal characters. If you want to allow Illegal character insertion in Informix, EILSEQ_COMPAT_MODE should be set as 1 so that we revert to Old legacy behaviour.
 
 {{###################################################################
1.	Character Processing Configuration Parameter
###################################################################
2.	EILSEQ_COMPAT_MODE - Controls whether when processing characters,
3.	the server checks if the characters are valid for
4.	the locale and returns error -202 if they are
5.	not. Acceptable values are:
6.	0 Return an error for characters that are not
7.	valid (Default)
8.	1 Allow characters that are not valid
####################################################################}}
OS:
Windows 10
Platform:
64-bit
Database Type:
IBM Informix
Database Version:
Informix server 14.10.FC5, Client clientsdk.4.10.TC14