0

The logical error is that the php doesn't display the desired output for pronunciation. eg. the desired output is \ə-ˈchēv\ but this one \?-?ch?v\ is displayed in the browser.

while($row=mysql_fetch_array($result))
    {
        $out .= "English word: " .$row['word_en'] . "<br>";
        $out .= "Pronunciation: " .$row['pronunciation'] . "<br>";
        $out .= "Grammar: " .$row['grammar'] . "<br>";
        $out .= "Definition: ".'<div style="width:600px; border:0px solid orange; margin-left: 90px; word-wrap:break-word; margin-top: -19px;">'. $row['definition'] . "</div>";

        //iconv("UTF-8", "ISO-8859-1//TRANSLIT", $out), PHP_EOL; //displays error

        echo $out;
    }

2 Answers2

0

You should set

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

to your browser HTML code

Harshit
  • 5,147
  • 9
  • 46
  • 93
0

This is problem with MySQL. Please check, which collation is used

  1. In connection (PHP code connecting to mysql)

  2. In database

  3. In tables

  4. In columns

These can have different collations.

(mysql replaces characters it doesn't know with question marks)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
david8
  • 444
  • 9
  • 23