I've set the PHP character set to utf-8
:
header('Content-Type: text/html; charset=utf-8');
I've set the currency
column in MySQL to varchar(1)
with collation utf8_unicode_ci
.
However, the following code in PHP:
$currency = '€';
$sql = "UPDATE myTable SET currency = '$currency' WHERE user = '$user'";
mysql_query($sql);
Produces the following character in MySQL:
â
How can I get the €
symbol to store properly in MySQL?