Question on encoding parameters and binary fields encoding (character_set_connection)

Question on encoding parameters and binary fields encoding (character_set_connection)

am 17.09.2010 03:09:59 von Filipus Klutiero

--------------050108050007030908050409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit



Hi,
I'm finding the description of character_set_connection unclear. Does
this influence the encoding of queries, but not of results? I'm
wondering about the effect of connection encoding.


Is there documentation on how exactly character set settings affect
BLOBs? For example, "this is what character_set_client does when you
insert, and this other setting intervenes when retrieving the value"?
I'm trying to understand an issue storing non-ASCII characters in a BLOB
inside a latin1 db using SET CHARACTER SET utf8. The issue doesn't
appear using SET NAMES. The difference is in the connection encoding.
I'd like to understand exactly how MySQL uses the encoding settings if,
for example, one runs

INSERT INTO files(`data` VALUES ($data)
then
SELECT `data` FROM files
, what happens at each stage.


--------------050108050007030908050409--