Bug #16483 Missing importance notice in the help
Submitted: 13 Jan 2006 14:52 Modified: 4 May 2006 14:07
Reporter: Richard Šusta Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Documentation Severity:S3 (Non-critical)
Version:1.0.7 OS:Windows (Windows 2000)
Assigned to: MC Brown CPU Architecture:Any

[13 Jan 2006 14:52] Richard Šusta
Description:
Repost - the previous post results in an error.

** Feedback to MySQL Connector/Net 2.0 manual **

The manual of MySQL Connector/Net does not include important notice.

Users must add Charset definition into MySQL connection string if they work on multilanguage databases, otherwise latin1 charset can be selected for the connection to MySql (if MySql configuration is unfavourable) and some characters are misinterpreted.

An example of the correct (tested) definition:  

MySqlConnection myConnection = new MySqlConnection( "Server=dce.felk.cvut.cz; User name=xxx; Password=yyy; Database=zzz; Charset=cp1250;" );
   
Please add this notice. I have searched it in the connector source code for 4 hours.

Thank for perfect MySQL database and Connector/Net.

Best regards. Richard Susta
-------------------------------------------------------
Ing. Richard Susta, Ph.D.
Department of Control Engineering, CTU, Prague, Czech Republic
Phone: +420 224 357 359, Fax: +420 224 918 646
email: r@susta.cz or susta@control.felk.cvut.cz  
WEB: http://dce.felk.cvut.cz/susta/  or http://susta.cz/ 

How to repeat:
1/ Install MySql with default connection configuration, i.e. latin1
2/ Create table with a text field. The coding can be cp1250 or utf8...
3/ Try from C# code  inserting special characters as "ěúůň...", i.e.,  e with hook, u with comma and circle, n with hook... The characters will be inserted without diacritical marks, ie, as euun

Suggested fix:
Add into the help that users must add charset definition into the connection string.

In the case of characters mentioned in the section above, users must add Charset=cp1250 into connection string definition.

An example of the correct (tested) definition:  

MySqlConnection myConnection = new MySqlConnection( "Server=dce.felk.cvut.cz; User name=xxx; Password=yyy; Database=zzz; Charset=cp1250;" );
[13 Jan 2006 15:29] Richard Šusta
Some table structures (their charsets) will require the connection string with utf8.
 
MySqlConnection myConnection = new MySqlConnection( "Server=dce.felk.cvut.cz;
User name=xxx; Password=yyy; Database=zzz; Charset=utf8;" );
[15 Jan 2006 21:05] Vasily Kishkin
Thanks for the bug report. I could't find about the default option in documentation.
[4 May 2006 14:07] MC Brown
I have added an 'Important' section to the end of the 'Handling Errors' section of the connector-net documentation.