Luterin
04-03-2007, 03:37 PM
I have a small simple php page that basically does something like this:
$sendstring="new Array(";
$result = mysql_query("select output from xxx",$db) or die("Query sucks!");
while ($myrow=cl_mysql_fetch_array($result)) {
$sendstring.="\"$output\",";
}
$sendstring=substr($sendstring,0,strlen($sendstring)-1);
$sendstring.=")";
echo "$sendstring";
And when I just run that page the result comes out as intended with the correct line in the browser. (if I run only the PHP page)
But when I run it thru my AJAX influensed Javascript, all the Swedish chars becomes ? instead of å,ä or ö.
Anyone got any idea why Javascript makes this look wierd?
$sendstring="new Array(";
$result = mysql_query("select output from xxx",$db) or die("Query sucks!");
while ($myrow=cl_mysql_fetch_array($result)) {
$sendstring.="\"$output\",";
}
$sendstring=substr($sendstring,0,strlen($sendstring)-1);
$sendstring.=")";
echo "$sendstring";
And when I just run that page the result comes out as intended with the correct line in the browser. (if I run only the PHP page)
But when I run it thru my AJAX influensed Javascript, all the Swedish chars becomes ? instead of å,ä or ö.
Anyone got any idea why Javascript makes this look wierd?