Chinese Characters
Chinese Characters
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ó
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ó