0

I am developing a German website with an SQL database. I recently switched from the English db entries to the German ones and noticed a weird behavior. On my local copy of the site, everything worked perfectly fine. But on the online server, every mutated vowel is replaced by a "�".

My local copy of the website also references a local database but I wasn't able to find a difference in the setup though I'm not completely sure about that.

In case you want to have a look at the site yourself, you can visit it at http://gma-app.de/index.php

Thanks a lot for your help.

The code:

<?php  
//query the characteristic options
$options = getCharacteristics($db);
?>

Prio 1 
<select name="characteristic1">
  <option value=''>Bitte auswählen</option>  

  <?php  
  //loop through the query results and insert them into the options
  foreach($options as $option){echo("<option value='" . $option['name_DE'] . "'>" . $option['name_DE'] . "</option>");}?>
</select>  

where $db references the database and the function getCharacteristics($db) is defined by:

function getCharacteristics($db){
$characteristics = array();

$results = $db->query("SELECT name_DE FROM characteristics ORDER BY name");

while($row = $results->fetch_assoc()){

  array_push($characteristics, $row);

}

return $characteristics;
}
marcell
  • 1,498
  • 1
  • 10
  • 22
Matsch
  • 1

0 Answers0