On 1/25/11 1:16 PM, Mark Martinec wrote:
How does MySQL know that the query parameter(s) should be UTF-8
and not ISO LATIN mumble or something else?
By a client executing a command:
SET NAMES 'utf8'
as far as I can tell.
SET NAMES indicates what character set the client will use
to send SQL statements to the server.
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
Mark
True; however, this still doesn't yield the desired result if the
table/column character set isn't UTF-8.
IFF client_charset == table_or_column_charset == UTF-8, then yes.
You could retrieve that charset value from the information_schema, but
it would be costly to do this for every query.
If you're setting up a mysql map, you should probably be aware of these
possible issues and adjust either the table or the query accordingly.
--
J.