0

I have a database in PhpMyAdmin where it's caracter set is UTF-8 which doesn't display correctly (it contains weird symbols).

I tried following this solution here , but I still have the same problem. Also I tried this solution too: solution 2 but this didn't work . The last thing I did is export the database in to an SQL file then changing it with Notpad++ to encode UTF-8 and then importing this SQL file in to the database again, but nothing changed; the gebberish characters still exist.

I am using:

  • PhpMyAdmin ( wamp server version : 5.7.24 - MySQL)

  • Database caracter set : UTF-8 Unicode (utf8)

  • The colloation proprety in PhpMyAdmin : utf8_general_ci

  • When I insert values in database like words in french (" é ") it works, but the old existing values returns just symbols and weird things like contr├┤le

  • My application is coded using PHP and I start every connection to database with :

    $db->exec("set names utf8"); 
    

I hope someone can guide me to how to solve this probelm I will appreciate it very much .

Martin
  • 22,212
  • 11
  • 70
  • 132
newbie
  • 63
  • 1
  • 8
  • What is the current table definition (ie the collation property) ? What happens when you edit data using phpMyAdmin ? Does it save the data consistently ? Then it could be your application that is not sending proper UTF8-encoded data. Consider posting some more code. – Kate Jul 11 '19 at 08:48
  • @Anonymous I added some more details in the post. The probelm exists only with the data already existing in the database , but the new data when I try inserting them they are inserted correctly. – newbie Jul 11 '19 at 09:18
  • Reading [this post](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) will almost certainly solve your issue – Martin Jul 11 '19 at 09:26
  • 1
    Possible duplicate of [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Martin Jul 11 '19 at 11:37
  • I still have the same problem . I coudnt figure it out – newbie Jul 11 '19 at 12:28

0 Answers0