A public service announcement before my answer. You're still using mysql_query. You will, eventually, have to upgrade to mysqli
at the very least, even if you don't want to go PDO. All the mysql_
functions are depreciated (see the big red scary box in the previous link) and will likely be removed in PHP 5.6. This is important because the main reason to suggest PDO in your case is prepared statements, which mysqli
can also do. A prepared statement is far less vulnerable to injection than escaping, but requires more queries (small performance hit) to do.
As to UTF8, what I would recommend is using mb_check_encoding to ensure the string is at least valid UTF8 before attempting to insert it.
Finally, there's this answer, which offers these words of wisdom
Another way to get yourself into hot water using
mysql_real_escape_string is when you set the database connection
encoding using the wrong method. You should do this:
mysql_set_charset('utf8', $link);
You can also do this though:
mysql_query("SET NAMES 'utf8'", $link);
The problem is that the latter bypasses the mysql_ API, which still
thinks you're talking to the database using latin1 (or something
else). When using mysql_real_escape_string now, it will assume the
wrong character encoding and escape strings differently than the
database will interpret them later. By running the SET NAMES query,
you have created a rift between how the mysql_ client API is treating
strings and how the database will interpret these strings. This can be
used for injection attacks in certain multibyte string situations.