Search code examples
mysqlmariadbodbccharacter

Error "Source character set not supported by client" when field set to uft8mb4_general_ci


Is this error a Windows MariaDB driver issue?

[MySQL][ODBC 5.1 Driver][mysqld-5.5.5-10.2.12-MariaDB]Source character set not supported by client

I keep getting the error when trying to connect using this asp code:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = Connection_STRING
rs.Source = "SELECT * FROM mytable WHERE text-str = 'some text'
rs.CursorType = 1
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
if (rsL.EOF) then
    ...
end if
rs.Close()
Set rs = Nothing

Solution

  • It was only after changing text-str datatype form VARCHAR to TEXT that things started to work.

    But some time later I found that I couldn't get any text from the table. I could save to it, but not get it back.

    Was finally able to resolve it by changing the field's default collation from utf8mb4_general_ci to utf8_general_ci. And now VARCHAR also works.


    The error I started after a Wordpress plugin update/removal. Somehow this changed some default settings to the database, and the way I was connecting to it was not working any more.

    Installing an updated ODBC driver solved it.