Setting MYSQL link coding
You can use the following ways

mysql_query("SET character_set_client='big5'");

Setting client code

mysql_query("SET character_set_connection='utf8'");

Set the encoding when writing

mysql_query("SET character_set_results='big5'");

Setting the output encoding

Can be used in a number of every page in the loaded profile
You can more easily control repository encoding