Page 1 of 1

Chinese Characters

Posted: Wed 04 Jul 2007 06:19
by b.szabo
Hi Guys,

I have a problem with Chinese characters with MySql.
I'm using VB 2005, mysql 5.1.18, MySQL direct 4 professional edition, and UTF 8 unicode for the tables. The coloumn is configured with varchar(255).
Theoretically it has to work. The textbox that I'm using uses Arial unicode to display the Chinese characters. When I'm copying the chinese characters inside, then the textbox shows the chinese characters.
After when I'm inserting the data to MySQL it only show ?????.
For inserting the data dataadapter is used, wich properly configured, becasue I can insert other data also. I've tried with gb2312, and big5 also but nothing seems to work. Even I checked the mysql query browser the data is inserted with ???. However if the data is inserted manually in the mysql query browser the data is showed with the chinese characters properly. Not all the tables coloumns are chinese, it has english columns also.
I'm using the following code:
Dim PlantsNewRow As DataRow = Me.PlantsDataset.plants.NewRow()

Try
PlantsNewRow(0) = Me.PlantIDMaskedTxtBox.Text
PlantsNewRow(1) = Me.PlantOfficialNameTextBox.Text
PlantsNewRow(2) = Me.PlantChineseNameTextBox.Text
PlantsNewRow(3) = Me.PlantAddressEnglishTextBox.Text
PlantsNewRow(4) = Me.PlantAddressChineseTextBox.Text
Me.PlantsDataset.plants.Rows.Add(PlantsNewRow)
Me.PlantsMySqlAdapter.Update(Me.PlantsDataset.plants)
.....
Do I have to convert the texbox value to something else.?!
Please help me because I'm stuck here, and this is very important.

I would really appriciate a quick help.
Thanks,
Barnabás Szabó

Posted: Wed 04 Jul 2007 08:15
by Alexey
Did you set Unicode=true in your connection string?

Posted: Wed 04 Jul 2007 08:20
by b.szabo
Yes, the connection string contains the unicode=true

Posted: Wed 04 Jul 2007 08:36
by Alexey
Please send me a small test project to reproduce the problem.
Include definition of your own database objects.
Use e-mail address provided in the Readme file.
Do not use third party components.

Posted: Wed 04 Jul 2007 08:42
by b.szabo
I cannot see your email address, can you write it down
Thanks

Posted: Wed 04 Jul 2007 09:21
by Alexey
Send it to alexeyi at crlab dot com.

Posted: Wed 04 Jul 2007 09:47
by b.szabo
When I prepared the test project i found the problem: in a other module, that is connected to this form, there was still an old 3rd party connector, wich caused the problem with corelab.
Thanks a lot for your time, at least indirectly it helped to make a test project.

Barnabás

Posted: Wed 04 Jul 2007 09:56
by Alexey
You are welcome.