Possible Duplicate:
UTF-8 all the way through
Hi I recently switched from linux to freebsb on my server, and now my database is acting up.
When I try to echo a string containing å,ä or ö (swedish letters) it becomes a questionmark. ie: Söndag becomes S�ndag. echo "ä"; works. $ file --mime test.php test.php: text/plain; charset=utf-8
test.php
<?php
$a="å";
mysql_connect("localhost", "root", ":-)");
mysql_select_db("lidev");
$result=mysql_query("select * from DLG where dag='Onsdag'");
$row=mysql_fetch_array($result);
echo $row['dagens'];
echo "<br>";
echo mb_detect_encoding($row['dagens']);
?>
mb_detect_encoding() outputs "UTF-8" My mysql table is in utf8_general_ci.
I'm completely stuck! What's wrong?
Cheers!