Page 1 of 1

malformed trial byte or out of range char

Posted: Wed 13 Oct 2010 19:33
by erwin71
hi, i'm getting this error message when i try to connect to a mysql DB on a linux host. When i try the same code on a Windows server there doesn't seem to be any probem.

because of this i think it has something to do with encoding.

can anyone help me with this issue?

iam using delphi 2010 with dbxmda 4.5.x trough 4.7 tested

Posted: Fri 15 Oct 2010 12:02
by AndreyZ
Hello,

Specify the driver you are using: DevartMySQL, DevartMySQLDirect or DevartMySQLEmbedded?
This error appears when encoding from UTF8 string is performed. Try to catch the string which causes this error in Linux.

Posted: Wed 24 Nov 2010 08:17
by tam
Hi,

same problem here. MySQL server is running on Linux, but I didn't check if it also happens on Windows.

I'm using direcet mode and Unicode.
Try to catch the string which causes this error
Not so easy. Can you include this string into the error message?

Posted: Wed 24 Nov 2010 13:21
by AndreyZ
We cannot include the string that causes this error into the error message because this string can contain undisplayable symbols.
Please try to do the following:
- set UseUnicode to False;
- send this string as UTF8 string to us for investigation.

Posted: Wed 24 Nov 2010 13:56
by tam
AndreyZ wrote:We cannot include the string that causes this error into the error message because this string can contain undisplayable symbols.
U can base64 encode it first. 8)
- set UseUnicode to False;
This is not possible, this error happens only several times per week, I can't really reproduce it. When it happnes next time, I try to find out, but I can't promise.

Posted: Wed 24 Nov 2010 14:32
by tam
Hi,

I forgot to mention that I'm using Delphi 2010 and MyDAC, but I think it's
the same reason as in dbExpress, isn't it?

Posted: Wed 24 Nov 2010 15:11
by AndreyZ
To investigate the cause of this problem we need this string. Please try to catch this string and send it to us.
I forgot to mention that I'm using Delphi 2010 and MyDAC, but I think it's the same reason as in dbExpress, isn't it?
You are right, the reason is the same.

Posted: Mon 24 Jan 2011 15:14
by tam
I almost forgot to inform you, sorry. Problem solved. There was another connection which was not set to use unicode, and under certain conditions it produced this strange error msg. :oops:

Posted: Wed 26 Jan 2011 08:41
by AndreyZ
It is good to see that this problem was solved. If any other questions come up, please contact us.