I have a database with text fields which stores Chinese text. The connection already uses "unicode=true". In MySQL, the field uses UTF-8 charset.
And the code has no problem with retrieving data.
When I update the text, with a very simple update statement:
UPDATE book SET long_desc='a long text here' WHERE id = '10874'
It gives me an exception if the string is long: "The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes"
This is my code:
DbCommand command = mConnection.CreateCommand();
command.CommandText = inCommand;
int affected = command.ExecuteNonQuery();
command.Dispose();
return affected;
buffer too small...
buffer too small...
Last edited by johnqh on Sat 21 Nov 2009 20:09, edited 1 time in total.
Please try using the latest 5.50.54 version of dotConnect for MySQL. If the problem persists, please give us the following information:
1) your call stack;
2) the versions of your dotConnect for MySQL, MySQL Server;
3) a small test project with DDL/DML script and a test data (text with Chinese characters). We will try to reproduce the issue in our environment.
1) your call stack;
2) the versions of your dotConnect for MySQL, MySQL Server;
3) a small test project with DDL/DML script and a test data (text with Chinese characters). We will try to reproduce the issue in our environment.