[Mono-list] MySql.Data and UTF-8?
Mon, 1 Nov 2004 17:41:03 -0500 (EST)
I am trying out MySql Connector .NET 1.0.1 (beta 2), after using ByteFX
0.76 for a while. The mysql database I am trying to talk to runs 4.1.3,
and uses utf-8 encoding.
I have a unit test which connects, runs some simple queries and closes.
On Windows, it succeeds fine. On Mono, it fails in this way:
System.NotSupportedException : Encoding name `latin1' not supported
in <0x000e4> MySql.Data.MySqlClient.MySqlConnection:Open ()
in <0x0004a> (wrapper remoting-invoke-with-check)
That exception seems to be thrown from the end of
System.Text.Encoding.GetEncoding(). So, I guess the connector Driver is
asking for "latin1" by default. I really want to tell it to use "utf8"
instead; does anyone know how to do this?
I suspected that the connectionstring was the place to do this, but the
help lists no way to set the encoding. Please let me know if you have any