VS>> Hа тех сайтах, с которыми я сейчас разбираюсь, вебмастер широко VS>> использует функцию mysql_set_charset(), в каком-то таком виде if VS>> ($this->link = @mysql_connect($host, $user, $pass, 1)) { VS>> mysql_set_charset('cp1251', $this->link); VS>> ... } VS>> Видимо она и влияет на charset в handshake. Hо какой выбирается VS>> charset, если эту функцию не использовать - я нигде даже ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ VS>> нагуглить не смог.
EG> This function is used to set the default character set for the current EG> connection. The string csname specifies a valid character set name. EG> The connection collation becomes the default collation of the EG> character set. This function works like the SET NAMES statement, but EG> also sets the value of mysql->charset, and thus affects the character EG> set used by mysql_real_escape_string()
EG> SET NAMES {'charset_name' [COLLATE 'collation_name'] | DEFAULT}
EG> This statement sets the three session system variables EG> character_set_client, character_set_connection, and EG> character_set_results to the given character set. Setting EG> character_set_connection to charset_name also EG> sets collation_connection to the default collation for EG> charset_name. See Section 10.1.4, Connection Character Sets and EG> Collations.
В процитированном не говорится, какой и откуда берется charset, если все эти mysql_set_charset() и mysql_set_character_set() не использовать в коде вообще никак.