469,924 Members | 1,469 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

DB2 issue for some Non English Characters

Hi,

I am facing some problem while inserting some non English characters to DB2 server from my java application. We are not able to retrieve the same record when searched with the same non English string. The data I tried is ĂąΏΓΔπήЄЊЯҖכظٔⁿ∑┴♠☺♫שׁﭯ שׁﭯﻼ (To be frank, I dont know which language it isThis is a bug reported by one of our client) .

Our observations/findings

1. On research, we noticed that the non english string which we entered is not saved in the database as such. We found that some of the characters are replaced with blocks ( ���������� )
2. On debugging the java code, we found that is is passed correctly to the statement object for insertion.
3. We tried to replicate the same issue by connecting to Oracle server (instead of DB2), but couldnt reproduce this issue. There it is working fine.

Our findings, makes us assume that the issue is with either
i. db2 database configuration
ii. IBM db2 java thin driver

Our configuration setting are as follows:
1. Db2 server version 8.1
2. db2 database created to support utf-8is as follows:
3.
CREATE DATABASE TESTDATABASE ON C: ALIAS TESTDATABASE USING CODESET UTF-8 TERRITORY US COLLATE .
.
4. Configured the environment variable () in DB2 Server

Can any one please, let me know the reason for this bug. Is it related to the DB2 server we are using or with the driver or is there any other reasons. Do I need to run any patch?????

Thanks.
Dec 6 '06 #1
3 2382
r035198x
13,262 8TB
Hi,

I am facing some problem while inserting some non English characters to DB2 server from my java application. We are not able to retrieve the same record when searched with the same non English string. The data I tried is ĂąΏΓΔπήЄЊЯҖכظٔⁿ∑┴♠☺♫שׁﭯ שׁﭯﻼ (To be frank, I dont know which language it isThis is a bug reported by one of our client) .

Our observations/findings

1. On research, we noticed that the non english string which we entered is not saved in the database as such. We found that some of the characters are replaced with blocks ( ���������� )
2. On debugging the java code, we found that is is passed correctly to the statement object for insertion.
3. We tried to replicate the same issue by connecting to Oracle server (instead of DB2), but couldnt reproduce this issue. There it is working fine.

Our findings, makes us assume that the issue is with either
i. db2 database configuration
ii. IBM db2 java thin driver

Our configuration setting are as follows:
1. Db2 server version 8.1
2. db2 database created to support utf-8is as follows:
3.
CREATE DATABASE TESTDATABASE ON C: ALIAS TESTDATABASE USING CODESET UTF-8 TERRITORY US COLLATE .
.
4. Configured the environment variable () in DB2 Server

Can any one please, let me know the reason for this bug. Is it related to the DB2 server we are using or with the driver or is there any other reasons. Do I need to run any patch?????

Thanks.
You need a user defined function (UDF for this).

This should shed some light

http://www-128.ibm.com/developerwork.../dm-0602doole/
Dec 6 '06 #2
Thanks for your update. I will try this out.
But it seems that the link which you have provided is related to Sorting functions. Will this fix my issue of data getting saved in different format (and so not able to retrieve it using the user entered value).

Once agian thanks for your immediate reply.
Dec 6 '06 #3
r035198x
13,262 8TB
Thanks for your update. I will try this out.
But it seems that the link which you have provided is related to Sorting functions. Will this fix my issue of data getting saved in different format (and so not able to retrieve it using the user entered value).

Once agian thanks for your immediate reply.
Oh the reason I thought about it is because a sort is done everytime a retrieve is done. Here is an explanation from Neopa
http://www.thescripts.com/forum/thread570905.html
Dec 6 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Ricky Romaya | last post: by
3 posts views Thread by Elie Grouchko | last post: by
3 posts views Thread by Ron M | last post: by
1 post views Thread by tony.pahl | last post: by
10 posts views Thread by Samuel | last post: by
10 posts views Thread by LayneMitch via WebmasterKB.com | last post: by
3 posts views Thread by Terry IT | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.