473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Language Settings for DB2 UDB 8.1

Hi,

I am setting up a database which requires some tables to store Thai
language data, as well as English data. For this, during the DB
creation of the test database, I set the following properties for the
DB:
-Database territory= TH
-Database code set= UTF-8
and DB2 set these values by default:
-Database code page= 1208
-Database country/region code= 66

After this, I inserted values into the column but the DB seems to
store and return junk values. I need to find out fast what values I
should set during the create db process to be able to support Thai and
English data.

The create db statement takes in the following params, for which I
need to set the correct values:
-CODESET
-CODEPAGE
-NLS CHAR SET
-COLLATE COMPATIBILITY
-IDENTITY
-IDENTITY_16BIT

Desperatly Seeking GURU!

Thanks in advance.

kP
Nov 12 '05 #1
6 7727
Hi Kanv,

You are on the right track. Code set UTF-8 and territory TH can be used to
store data in English, Thai and many other languages. You can also use
codeset TIS620-1 and terrtiroy TH to store English and Thai data only.

There must be some other things that were set incorrectly. Did you set
DB2CODEPAGE? What database application did you use? What operating system
did you use? What is the language environment of your operating system?

Sherman

"Kanv" <ka********@hotmail.com> wrote in message
news:25**************************@posting.google.c om...
Hi,

I am setting up a database which requires some tables to store Thai
language data, as well as English data. For this, during the DB
creation of the test database, I set the following properties for the
DB:
-Database territory= TH
-Database code set= UTF-8
and DB2 set these values by default:
-Database code page= 1208
-Database country/region code= 66

After this, I inserted values into the column but the DB seems to
store and return junk values. I need to find out fast what values I
should set during the create db process to be able to support Thai and
English data.

The create db statement takes in the following params, for which I
need to set the correct values:
-CODESET
-CODEPAGE
-NLS CHAR SET
-COLLATE COMPATIBILITY
-IDENTITY
-IDENTITY_16BIT

Desperatly Seeking GURU!

Thanks in advance.

kP

Nov 12 '05 #2
Hi Sherman,

Thanks for the post. OS: Win2K. Lnaguage Settings: Have set regional
settings on DB machine to support both English and Thai input.
Codepage: 1208. Have also tried code page 874 with TIS620-1. With no
luck.

Is there anything I am missing out? With the language set to THAI,
when I enter the Thai data into the 'Command Center' it just shows
junk and once data is inserted into the table and retrieved, its junk
too.

KP
Nov 12 '05 #3
On 2004-04-08, Kanv scribbled:
Hi Sherman,

Thanks for the post. OS: Win2K. Lnaguage Settings: Have set regional
settings on DB machine to support both English and Thai input.
Codepage: 1208. Have also tried code page 874 with TIS620-1. With no
luck.

Is there anything I am missing out? With the language set to THAI,
when I enter the Thai data into the 'Command Center' it just shows
junk and once data is inserted into the table and retrieved, its junk
too.

KP


One other question that might help... Are you using CHAR/VARCHAR or
GRAPHIC/VARGRAPHIC fields to store the text? CHAR/VARCHAR are stored as
UTF-8 in Unicode databases (codepage 1208), while GRAPHIC/VARGRAPHIC
are stored as UCS-2. Furthermore, while the UTF-8 CHAR/VARCHAR fields
will be translated into the client's codepage, UCS-2 GRAPHIC/VARGRAPHIC
fields will not undergo any translation:

Administration Guide - Planning - Appendix E:
"When an application program is connected to a UCS-2 database [created
with codepage 1208], character string data is converted between the
application code page and UTF-8 by DB2 UDB, but graphic string data is
always in UCS-2."

If you are using CHAR/VARCHAR fields, have you tried using
GRAPHIC/VARGRAPHIC fields instead - or vice versa?

HTH, Dave.

--
Dave
Remove "_nospam" for valid e-mail address

"Never underestimate the bandwidth of a station wagon full of CDs doing
a ton down the highway" -- Anon.
Nov 12 '05 #4
Hi Dave,

There are only a couple of fields and they are all VARCHAR. My DB is
on NT, and I also tried installing the Thai language set on the
OS...just to be sure. But still.... no can do Thai.

:(

KP
Nov 12 '05 #5
On 2004-04-12, Kanv scribbled:
Hi Dave,

There are only a couple of fields and they are all VARCHAR. My DB is
on NT, and I also tried installing the Thai language set on the
OS...just to be sure. But still.... no can do Thai.

:(

KP


Hi Kanv,

Okay. Try changing the definition of the fields from VARCHAR to
VARGRAPHIC instead (GRAPHIC is DB2's slightly bizarre name for 2-byte
characters). As I mentioned in the previous post, VARGRAPHIC fields
undergo no translation so, assuming it's the UTF-8 conversion that is
trashing the data, this might make a difference.

One thing to note though: because VARGRAPHIC fields contain 2-byte
characters, as opposed to VARCHAR which stores 1-byte characters
(although up to 3-bytes can be used for characters by the UTF-8
encoding scheme) the maximum length of a VARGRAPHIC field is half that
of an equivalent VARCHAR field. Hence, while the maximum size for a
VARCHAR field definition is 32672, the maximum size for a VARGRAPHIC
field is 16336.

I must admit I'm skeptical that the UTF-8 conversion could be trashing
the data (it's not exactly a difficult piece of code - and there are
numerous reference implementations). I think it's more likely that
something "either side" of the database (the application(s) being used
to insert and/or retrieve the data) are doing something strange. Maybe
the output isn't being translated from UTF-8 and you're seeing raw
UTF-8 encoding?

If the above suggestion doesn't work, could you send a sample of the
trashed data to my e-mail? If you can manage it, a screen shot would be
good too (to avoid any mail gateways translating the data any further).
I'm on DSL so it doesn't matter if it's large (obviously, don't post it
here! :-)

HTH, Dave.
--
Dave
Remove "_nospam" for valid e-mail address

"Never underestimate the bandwidth of a station wagon full of CDs doing
a ton down the highway" -- Anon.
Nov 12 '05 #6
Hi Dave,

Will try out what you suggested. The max length for VARGRAPHIC should
be enough for me. Thanks.

KP
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Gustaf Liljegren | last post by:
In IE (at least from version 5), you can change your prefered language, so that for example the Windows Update page appears in another language than the system default. Here's the process: Tools...
9
by: WizardLee | last post by:
Hi, all, A new feature is required to add to my program today. But I do not have any idea about it. The feature should implement these two functions: 1, Select "Install files for East Asia...
3
by: clintonG | last post by:
I'm messing around with the Request.UserLanguages and the Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"); to see how similar or dissimilar they may be. I observe and conclude that both get...
5
by: Jack | last post by:
Hello, I have a VB.NET application that will be distributed in the US as well as many European countries. It uses an xml database with number values, that are stored as text, that are all in...
1
by: PawelSokolowski | last post by:
Hi all, C++, .NET 2003. I have created an application that I want to distribute in 4 languages. This is static MFC with no DLLs, every language has its own build configuration. I have 4 String...
0
by: Bruna | last post by:
I'm working in vb.net 2005, and in a project we're working, we have a main form and a few other forms with different settings. One of them is User setting form with 3 settings, and one of them is...
2
by: shizah | last post by:
Hello how can I convert my web pages into Arabic in such a manner that the value in the text boxes will be in Arabic rather than English. The thing I know is just the code for Arabic is "ar-sa"...
1
by: Screaming Eagles 101 | last post by:
This is not a question but something I found, it might not be the best solution, but hey, it works... :-) Thought someone else could also use this, so here it is. I made 2 resource files, one...
3
by: plenty900 | last post by:
Hi folks, I've altered the PHP underlying a website to support a few languages other than English, but the Firefox version that I'm using is of course the English-language one. When I set the...
1
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, My C# program supports different languages using resource files. I need a way to detect the language used in the host computer, then the software can change its own language settings. How...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.