I have a very strange behaviour that I'm experiencing. When I run insert into with an UTF8 Character (specifically the 'ő' or 'ű' hungarian characters) it inserts a ? instead of the character. However if I echo it out right before passing into the query it shows the right characters.
What I have done:
- I have set every possible collation, charset in the mysql tables and databases to UTF8.
- I have called
mysql_query("SET NAMES 'UTF8'");
- I have called
mysql_query("SET CHARACTER SET UTF8");
- I have set website encoding with:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
What works as intended:
- PHPMyAdmin
- Echoing Special Characters from tables
It's working on a localhost server. The non local server's default encoding is ISO-8859-1 which I can't change.