Re: cannot change character set (solved)
Posted by: Zoltan Sz
Date: June 29, 2010 07:13AM

Dear Rick,

Thank you for your detailed reply. You pointed me towards the solution, which is quite simple if one knows what to do and where to do it.

In found out that it is not enough the set the variables on phpMyadmin. There are so-called global variables and session variables. I initially tried to set the global variables but it did not work. In most of the cases only the session variables were changed. But for MySql it does not make any difference to set the session variables in phpMyAdmin because it does not affect the session of the website when it connects. As you pointed out correctly, the only solution is to set the session variables by the client, immediately when the website connects to the database server. It is because of the unfortunate fact if no character set is specified, the connection defaults to latin1. (Defaulting to utf8 would support more characters and I would have had no problem).

The setting in .net takes place in the connection string (it also works for the data layer). By chance I have found the following description on the web:
If you do not specify the character set, the connection defaults to the latin1 charset. You can specify the character set as part of the connection string, for example:
MySqlConnection myConnection = new MySqlConnection("server=;uid=root;" +

I simply had to enter Charset=utf8 and the problem has been solved.

Again, thanks Rick for your invaluable support!


Options: ReplyQuote

Written By
June 09, 2010 12:51PM
June 13, 2010 09:44PM
June 21, 2010 08:25AM
June 23, 2010 11:37PM
June 25, 2010 07:46AM
June 26, 2010 01:30PM
Re: cannot change character set (solved)
June 29, 2010 07:13AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.