Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internationalization (thai language)

Status
Not open for further replies.

rbod

Programmer
Feb 1, 2005
74
US
Hi! I am looking into creating a database in thai language on windows/DB28.1.6. I looked at the create database command, but not very clear.
Any information/pointers appreciated.

thanks for your time
 
rbod,

is it the interface language you're after (ie that which appears in error messages etc) or the language that the data can exist in. LAnguages that data exist in, are a superset of language supported by the db2 interface.

I have some info on the interface language I could look up but don't have anything to hand on the languages data can exist in. Suspect the admin guide, planning might have that.

Cheers
Greg
 
since you looked at the create database statement, I guess it is about the data.

well, i never used thai, for german (or other languages) we specify the codepage and territory accordingly.
So you need either a thai (or the unicode) codepage.

when moving from a locale codepage to unicode it is not trivial, since character length do not specify anymore the number of characters but the number of bytes, and since some chars have 2 or 3 bytes in unicode, not everything fits any longer ... well that is ANSI SQL

Still, for thai I found this:

Another try would be using the control center and selecting the locale settings you need and have a look at the generated CREATE DB statement (but I dont know whether this works with thai as well)


Juliane
 
thanks for looking into this.
I was trying to create a [single-byte]database that can store data in thai as well as english, on Windows. I cannot use unicode due to some restrictions. I tried creating the database using the thai codeset[TIS620-1] and territory[TH]. But when I try to connect to the database it gives me an error about codepage conversions.
When I create a thai database on the en_US configured system
Code:
 and try to connect to it, I get the following error :
SQL0332N  There is no available conversion for the source code page "1252" to the target code page "UNKNOWN".  Reason Code "1".  SQLSTATE=57017

Character conversion will not occur for:
A DB2 product or platform that does not support, or that does not have support installed, for the desired combination of code pages. In this case, an SQLCODE -332 (SQLSTATE 57017) is returned when you try to run your application.
Changing the locale to th_TH does not help.The right code pages have to be there. The existing system does not have the right code pages/conversion tables, so conversion cannot take place.  The group for thai code page on windows is S-20  and for English-US is S-1.  S-1 and S-20 groups cannot work together or conversion is not possible between these two groups.

[If I create a unicode database using codeset UTF-8 it stores thai and english data, since unicode covers all the code pages].
 
I guess, to create a single-byte thai database, I need a thai OS.

Are there any other alternatives to create a thai database on an english windows box?

thanks
 
I dunno exactly what this all means, but we had - when introducing a new codepage on the server - to add the conversion information on the client.

Check for IBM00874.ucs in the sqllib\conv directory.

Unfortunately I have right now no install of DB2 UDB at hand, but if I remember correctly it has to be in the sqllib/conv directory. So you might just have to add(copy) the IBM<number>.ucs to your client.
We had to do this to get 'new' codepages (e.g. Euro introduction, or new languages like turkish) working. Not all conversions are shipped with an english client install.


Since Thai(Thai Industrial Standard, TIS) TIS620-1 has codepage 874, the file should be IBM00874.ucs.



Juliane
 
thanks, Juliane.
The problem is not at the client. I tried to connect to the database on the server itself and it would not let me connect.
here is what I did:
1)db2 create db thai_db using codeset TIS620-1 territory TH COLLATE USING NLSCHAR
DB20000I The CREATE DATABASE command completed successfully.
2)db2 connect to thai_db
SQL0332N There is no available conversion for the source code page "1252" to the target code page "UNKNOWN". Reason Code "1". SQLSTATE=57017

According to the documentation, conversion between thai code page and windows code page is not possible.
The group for thai code page on windows is S-20 and for English-US is S-1. S-1 and S-20 groups cannot work together or conversion is not possible between these two groups.

IBM00874.ucs does exist on the server.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top