Stroring chineese chars exactly into mysql DB...possible?

Hi

Thanks giving me support for all kinds of issues which i have....

Here i have a small doubt.. i hope you people can clear it...

Here is my doubt..

Iam new to this internationlizarion issues ...

Iam hadling a chineese project in that i want to store the chineese char's exactly into mysql database...is it possible to store like that ..if it is ,please can you give me some idea how to do that ....

Thanking you in advance

Srikanth

[485 byte] By [srikanth_bsba] at [2007-11-26 21:15:30]
# 1

Sure, to store any character, Chinese or otherwise, you must make sure that the database charset contains your character too. So, if you're working with Chinese, your db charset must be able to represent Chinese characters: GB18030? Unicode? Something else?

Set your db charset appropriately. Your table CREATE command or other tools allow you to do this at the table granularity. Alternatively, you might set the entire db charset when you create the db instance.

Your MySQL JDBC drivers should handle the conversion from Java's Unicode charset to your MySQL charset. I don't ever recall having to call any specific method on the driver classes themselves in order to affect the charset settings. The drivers should be able to get that information from the connection information when communicating with the db.

--

John O'Conner

joconnera at 2007-7-10 2:54:12 > top of Java-index,Desktop,I18N...
# 2

hi joconner

Thanx alot for your reply for my post ......

please can you give me any example how can i setup my database to set these characters....i mean to store these chinese chars exactly ....

Here i did some thing......please can you correct it if anything goes wrong..

Some where in the doc's i have searched in the net they are specified that change the default char set of client and server in my.ini

According to them here iam changed to utf8 in both places (client and server)

This file avilable in mysql root directory...

then iam

creating a database with chatset utf8

creating a table with chatset utf8

specifing column with charset utf8 and collation utf8_general_ci

then

Iam getting the data from java in the form of NCR format (Like &amp#220027).

Here this iam strucked up what should i do now....please can you explain what should i do...

If the explanation in not proper please let know iam ready to explain.......again and again this is some what ungent for me...

Thanking you

Srikanth

srikanth_bsba at 2007-7-10 2:54:12 > top of Java-index,Desktop,I18N...