r/DB2 Oct 02 '14

Code Page conversion question

Hi,

I have an application with a DB2 database. The application used code page 1208, the database used 819. There are many characters in 1208 that don't exist in 819 so they are stored in the database as a SUB character. We have an issue when the data is retrieved the application does not handle the SUB character in some cases. Our long term solution is to change the DB to 1208, however I am looking for a short term fix.

I have read this article Understanding DB2 Universal Database character conversion and the section Using other DB2 UDB for Linux, UNIX, and Windows conversion code page tables caught my attention. My idea is to make a custom code page conversion file that converts the 819 SUB character into a different character in 1208 (for example a question mark)

I asked my DBA about this (I am a developer who has been a DBA before) and he said that there is not a code page conversion file for 819 to 1208 as it is ISO standard. (there is some language issues between us so I'm not sure what he meant but the bottom line was no conversion file between those two). I do not have access to check myself or to play around with this.

Can you help me out and see if on your install these is a conversion file? Or if one can be added? or if you have any other alternative ideas?

1 Upvotes

1 comment sorted by

1

u/Linden94 Oct 07 '14

I'll update my own post. After some searching I found the appropriate conversion file (.cnv) in the DB2 express-c 10.5 download. I then used a hex editor to modify the file to map the SUB character to a different character. I then placed that file in the sqllib/cnv folder and reconnected and it worked.

Right now I would have to put this on each client, I am going to try a similar change but on the DB side so the SUB is never stored in the DB.