IDS, JDBC, NEWCODESET
Posted in 2009
Data is stored in IDS 10 or later without any locale defined, so its en_US.819. The application for data maintenance is written in C/C++ and uses only single byte chars either ISO-15 or ISO-2 codeset. So when accessing this data through a java application the data has converted from ISO-1 in IDS to Unicode in Java. We had to "manipulate" this automatic activity. We used the Property NEWCODESET to say that the bytes read from the database should be converted to unicode by using the ISO-2 charset instead of ISO-1. The connection-url was e.g. jdbc:informix-sqli://sb2000:11100/mbi2e_lafr:INFORMIXSERVER=sb2000_net;NEWCODESET=8859_2,8859-1,819 Using XA datasources now, this does not work for us any longer. The driver provides a setIfxNEWCODESET(String) method which is called by the application, the properties read by executing getDsProperties() on the IfxXADataSource object afterwards contains this property with the right value but the conversion is not done as it should be and we get exceptions because of not mappable characters. This is still not working with latest server (IDS 11.50.UC4 on Solaris) and JDBC (3.50.JC4) versions. We tried also with JDBC 3.50.JC2 and IDS 11.10 and 10.00.UC8 even on different platforms. Did anybody else have this problem? Anyone thinking we are missing something? P.S.: Older versions of JDBC (before 3.50.JC1) silently replaced the unmappable chars by a question mark (see http://www-01.ibm.com/support/docview.wss?uid=swg1IC49877).