0

enter image description here

This utf8 problem bothered me again

It's ok on the other pages, but it can't show it on this page


I tried the following methods but it did not work

  • mysqli_query($conn, "SET NAMES utf8");
  • <meta charset="UTF-8">
  • enter image description here
  • 1
    utf8_* isn't the UTF-8, you should use utf8mb4_* – Dharman Jun 24 '22 at 13:22
  • `SET NAMES utf8` shouldn't be used from PHP. Set the correct connection charset using the API methods provided, e.g. `mysqli::set_charset()` – Dharman Jun 24 '22 at 13:22
  • omg!! A small dash sign had delayed me for hours. i use `SET NAMES utf-8` And the problem was solved – Aref Solaimany Jun 24 '22 at 13:28
  • I sincerely doubt it, because that's not a valid syntax. Anyway, you must remove `SET NAMES` completely from your code. – Dharman Jun 24 '22 at 13:31
  • 1
    See "Mojibake" in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Jun 24 '22 at 15:07

0 Answers0