Bug #5619 Data encoding not set
Submitted: 16 Sep 2004 21:50 Modified: 28 Sep 2004 9:53
Reporter: Scott Grosch Email Updates:
Status: Duplicate Impact on me:
Category:Connector / NET Severity:S1 (Critical)
Version:1.0? OS:Microsoft Windows (Windows XP)
Assigned to: Assigned Account CPU Architecture:Any

[16 Sep 2004 21:50] Scott Grosch
When a connection is created you query the MySQL server and then try to set the character encoding, and you throw an exception if it's null.  I'm always getting an exception as the string you're looking for from the MySQL server does not exist.

How to repeat:
Make a connection :)

Suggested fix:
If no encoding is set, just default to utf8.  I modified your code to do so and then my app works without issue.
[17 Sep 2004 1:10] Svetoslav Milenov
Hi, I have already reported similar problem with fix, look at bug 5584.

In the original code they are setting utf8 as default if the server does not report something else, but only for ver. bigger than 4.1.0.

As the guys from MySql are saying that they are not going to support versions prior 3.23 (and I have to :) ), I have made a simple change to make the default encoding to latin1, as it is written in the docs.

Btw, what ver. of MySql you have problems with?

[28 Sep 2004 9:53] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

This is a duplicate of a previously submitted bug.  We now use latin1 as the encoding if the server doesn't report an encoding.