A quick thank you for all the awesome work on this project throughout the years :-)
I was having issues exporting data from one machine to another via PMA, UTF-8 chars were turning to ??? and whatnot.
I did some poking around and found that only a few of the character_set_% variables were being set, and character_set_results in particular wasn't changing at all [it was stuck as utf8 even though my collation was latin1], no matter which collation / charset I set PMA to.
My website connects using latin1, for backwards compatibility, so I use: SET NAMES 'latin1'
PMA doesn't use SET NAMES when a user collation is specified, only when the user has not specified a collation... maybe it should?
I changed ./libraries/database_interface.lib.php ~ line 853 to:
# PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
# $mysql_charset = explode('_', $GLOBALS['collation_connection']);
# PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE);
$mysql_charset = explode('_', $GLOBALS['collation_connection']);
PMA_DBI_query("SET NAMES '" . $mysql_charset . "' COLLATE '" . $GLOBALS['collation_connection'] . "';", $link, PMA_DBI_QUERY_STORE);
... and it worked like a charm :-)
I understand this is for the CONNECTION collation, but maybe there should be a better way to control all the character_set_% charsets / collations, like through through SET NAMES.