我在我的 mysql 数据库中放入了一些可以正常工作的数据。但是当我使用 json_encode 获取数据时,我会像这样返回:
{"idpostdata":"49","artID":null,"timestamp":"06.11.2012 13:35","lat":"51.496911","lon":"7.4022327","cellID":null,"road":"Wittener Stra\u00dfe","suburb":"Eichlinghofen","city":"Dortmund","postdatacol":null,"state_district":"Regierungsbezirk Arnsberg","state":"North Rhine-Westphalia","country_code":"de"}
你看到"road":"Wittener Stra\u00dfe"
的不是正确的名字,它必须是 Wittener Straße
我的代码:
<?php
$sql = mysql_query("SELECT * FROM postdata");
while ($ds = mysql_fetch_assoc($sql))
$output[]=$ds;
echo "{uTraf:";
print(json_encode($output));
echo "}";
mysql_close($dz);
?>
怎么了?