Chinese Characters

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
b.szabo
Posts: 14
Joined: Wed 04 Jul 2007 05:50

Chinese Characters

Post by b.szabo » Wed 04 Jul 2007 06:19

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ó

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 04 Jul 2007 08:15

Did you set Unicode=true in your connection string?

b.szabo
Posts: 14
Joined: Wed 04 Jul 2007 05:50

Post by b.szabo » Wed 04 Jul 2007 08:20

Yes, the connection string contains the unicode=true

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 04 Jul 2007 08:36

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.

b.szabo
Posts: 14
Joined: Wed 04 Jul 2007 05:50

Post by b.szabo » Wed 04 Jul 2007 08:42

I cannot see your email address, can you write it down
Thanks

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 04 Jul 2007 09:21

Send it to alexeyi at crlab dot com.

b.szabo
Posts: 14
Joined: Wed 04 Jul 2007 05:50

Post by b.szabo » Wed 04 Jul 2007 09:47

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

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 04 Jul 2007 09:56

You are welcome.

Post Reply