UTF8 characters not showing

Notice: This thread is very old.
richard
Member | 60
+
0
-

Hello, I am not too sure if this is a bug, but it looks like that to me…

I have a simple code:

<?php
echo "îé"."\n";
mssql_connect('server', 'usr', 'pass');
mssql_select_db('db');
$query = mssql_query("SELECT utfColumn FROM utfTable");
$row = mssql_fetch_array($query);
echo $row[0];
die();
?>

When I put this into index or bootstrap the string returned from DB prints OK. When I put that anywhere into presenter or model, the non-ascii characters are not printed. Apparently all the php files are ascii encoded (index, bootstrap, presenters…).

result in index and bootstrap:
îé
îé

result in presenters and models:
îé (comes from first echo)
�� (the same characters from DB)

Why is that?

enumag
Member | 2118
+
0
-

Use UTF-8 encoding for all PHP files.

Oh and the reason is most probably this line.

Last edited by enumag (2013-06-13 09:07)