Having problems returning a list of Japanese terms from an MSSql database as JSON. If I return them as a bunch of list items all is ok, but I can not seem to get json encode to work for me. Any pointers much appreciated.
$prefs = array();
while($row = mssql_fetch_array($result))
{
$prefs[] = mb_convert_encoding($row["Pref"] , "UTF-8", "SHIFT-JIS") ;
//echo "<li>" . mb_convert_encoding($row["Pref"] , "UTF-8", "SHIFT-JIS") . "</li>";
}
echo json_encode($prefs);