Answer the question
In order to leave comments, you need to log in
How to fully set UTF-8 encoding on a website?
Good day. I'm trying to set the UTF-8 encoding on the site, but there are still hieroglyphs in the database.
I registered in the .htacces file AddDefaultCharset UTF-8
When connecting to the database, I make a request
mysql_query("SET NAMES 'UTF-8'");
mysql_query("SET CHARACTER SET 'UTF-8'");
<meta charset="utf-8" />
latin1_swedish_ci
Answer the question
In order to leave comments, you need to log in
In phpmyadmin go to the "Operations" section and make sure the database, table, table fields are all utf-8 encoded.
If not, then specify utf-8.
Then enter/edit data.
Make sure that the data sources (where the data comes from) are passing strings in UTF-8.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question