My table which I am getting my data from is in "Latin_1" however when the data is returned the fields with German characters in get returned as empty. Why is it doing this ? does json encode affect the char set? other than that I am completely lost.
I have read you can set the character set in php but it is already set correctly and the table has the special characters in ?
Edit//
here is the code i am using __php:
function getInfo($country){
$rows = array();
$query = "SELECT name,add1,add2,town,district,postcode FROM stockistsWorld WHERE country = '". mysql_escape_string($country) ."' LIMIT 4 ";
//$query = "SELECT Name,add1 FROM stockistsUK LIMIT 10";
$result = mysqli_query($this->conn, $query);
/* numeric array */
while($row = mysqli_fetch_array($result, MYSQLI_NUM)){
$rows[] = $row;
}
return $rows;
}
and this is the ajax request__
function ajaxData(country){
//get data from database return into inf array
var infArray = new Array();
$.ajax({
type: 'POST',
url: 'php/Maps.php',
data: {country: country},
success: function(data){
infArray = JSON.parse(data);
geoCodeClientSide(infArray);
}
});
}