It seems to be common knowledge to use mysql_set_charset / mysqli::set_charset instead of the direct MySQL query set names.
The reason often cited is that se
mysql: the whole interface is deprecated, so don't use any of it at all (PHP 7 removes the interface).
mysqli (and PDO) has prepared statements that make the use of real_escape_string not needed (nor wanted).
-> So if you use mysqli and prepared statements only: no worries how you set the charset.
Since you care about security: I see little point in not using prepared statements.
Once you use mysqli's prepared statements the only way forward is to use $mysqli->set_charset() as you can't simply concatenate multiple sql statements in one string anymore.
Hence the question to know the difference is at most academic and not relevant in real life.
In summary:
mysql: don't use at all.
mysqli: use prepared statements and hence the set_charset() method
Also: you won't need real_escape_string anymore once you use prepared statements.
or -of course- use PDO and it's methods.