DB2 and codepage questions - Umlauts again!!!

400 views
Skip to first unread message

jtu...@objektfabrik.de

unread,
Mar 6, 2012, 8:09:28 AM3/6/12
to va-sma...@googlegroups.com
I'm stuck somewhere in configuring a Linux based machine with DB2 Express-C and VA Smalltalk. My problem lies in codepages and umlauts.

What I've found out so far is that I have to create a database using create database xy using codeset iso8859-15 territory DE.

Connecting to that server from a windows box with German settings works like a charm with no additional db2 settings. Simply cataloging the database and connecting to it with  a VA ST image brings up correct umlauts from and to the database. Seems like the DB2 CLI client on windows simply runs using an ISO8859-x charset.

But what do I do on a Linux box? I tried exporting DB2CODEPAGE=ISO-8859-15 in the VA Smalltalk startup script, but that doesn't help much. I also put db2set DB2CODEPAGE=ISO-8859-15 into the instance owner's ~/sqllib/userprofile and the value is also displayed when I call db2set -lr. But still the client seems to work with Unicode/UTF-8. Umlauts return as two characters from select statements.

So do I change something in VASTs database code or do I have to continue searching in the DB2 docs?

jtu...@objektfabrik.de

unread,
Mar 7, 2012, 2:43:07 AM3/7/12
to va-sma...@googlegroups.com
HI again,

maybe I need to sort a few things in that complex. The base question here is: where exactly does the DB2 driver get its locale information from.

* Do I have to set something from within the VAST image?
  - I haven't found any setting anywhere - am I missing something?
* Is it the locale of the Linux User that starts the VAST process?
  - The locale is en_US.iso8859-15, because that is what Instantiations suggests for VAST on Linux.
* Is it the locale on the db2 instance owner on that machine?
  - The default locale for that user is de_DE.utf-8 
* Is it the DB2CODEPAGE registry variable?
  - It is set to ISO8859-15

I know this group is probably not the perfect ask the last two questions. But I am hoping for someone here sitting in the same boat and having solved the problem ;-)

Joachim

jtu...@objektfabrik.de

unread,
Mar 7, 2012, 2:10:33 PM3/7/12
to va-sma...@googlegroups.com
Sometimes, it is good to sleep with a problem under the cushion.

The solution is to add the line export DB2CODEPAGE=923 to the act start Script. 
The rest is handled by DB2.

Thanks for reading,

Joachim
Reply all
Reply to author
Forward
0 new messages