Maxscale actually send latin1 charset to client.
Depending on client (driver) implementation, that may create encoding issues.
test case :
Using java connector (MySQL or MariaDB) will throw an exception using maxscale : "java.sql.SQLDataException: Incorrect string value: '\xF0\x9F\x8C\x9F' for column 'field1' at row 1
Query is: INSERT INTO unicodeTestChar (id, field1) VALUES (1, ?), parameters ['-star-']"
Server has to know the charset client is using :
C/C will send the charset defined with character_set_client.
C/J always use utf8 (that permit to have optimization)
PHP pdo seems to work the same way than C/J
So in Initial Handshake Packet server will indicate his default
Client will then send the encoding it use in Hanshake response packet
C/J will send utf8 (33) or utf8mb4(the value send by server) according to what server send initially.
problem is masxcale always send a value "8" corresponding to latin1
so C/J will send UTF8(33), even if server is configured to use utf8mb4.
That will cause problems afterwhile, because server check that data are correct according to client charset. when client send a 4 byte utf8 character, server will throw an exception : " Incorrect string value".