No Problem reading Unicode, but can't insert Unicode through C#
I was very pleased with Unicode support in MySQL 5.x . I could mix and match Japanese, Traditional Chinese and Simplified Chinese characters in a single nvarchar field. I could insert records using Navicat and then read them back from MySQL Query Browser. I can even read all these Unicode character using C# and Connector/N with no problem.
Trouble comes when I try to INSERT records into the table. All the Unicode characters turned into question marks. Since Unicode worked fine when I insert records into MySQL 5 with MySQL Query Browser, the issue should be on Connect/N.
I used direct SQL statement like this in C# (2.0):
command.CommandText = "INSERT INTO DiscCatalog (Disk, Name, Path, FullPath, Size, Date, Time, Category, Level, Files, Type) VALUES ('ペ', '尊重', 'ペ', '风云榜', '50 000 000', '5/12/2006', '13:29:30 PM', '', 3, 0, 'File')";
command.ExecuteNonQuery();
So do I need to explicitly do anything to tell MySqlCommand that the CommandText is a Unicode string?