• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Special Characters not Working

rafaelgrecco

New Pleskian
Hello,

I am manually migrating all websites that I host (WebsitePanel) to Plesk.

Sites that use database (MySQL) can't display special characters.

Please see the image below: I marked green the special characters that are OK and red the special characters that are broken (the broken characters are data from the database).

migration.png

I can't find the configuration to fix it. Can you guys help me?

Thanks.
 
To prevent the appearance of non-UTF8 symbols on site's pages you need to change default character set for WordPress database to utf8. Try to do it with something like:

mysql> alter database wordpress_db default character set utf8;
 
To prevent the appearance of non-UTF8 symbols on site's pages you need to change default character set for WordPress database to utf8. Try to do it with something like:

mysql> alter database wordpress_db default character set utf8;

Hi Igor, thank you for your help.

The site is actually made using ASP, not Wordpress (but it does not make a difference... I have Wordpress sites with the same behavior).

While the character set was already uft8, I did run the code that you posted just to make sure, but it does not seem to make a difference. This is what I have:

acd1.png


acd2.png

It is using the exact same configuration on my old server (WebSitePanel)... I can't find the problem :( and I am not a database specialist...

Do you have any other idea?

Thank you very much.
 
Looks like initial data on the source website stored in non-UTF8 in the source database. In other words, tables encoding is UTF8, but stored text has another encoding. In certain cases such data could be corrupted while importing database.

Could you please take a look on the corrupted text in the target database using phpMyAdmin? If you edit and fix it manually (any one place for test), the issue will be fixed on your site?
 
Looks like initial data on the source website stored in non-UTF8 in the source database. In other words, tables encoding is UTF8, but stored text has another encoding. In certain cases such data could be corrupted while importing database.

Could you please take a look on the corrupted text in the target database using phpMyAdmin? If you edit and fix it manually (any one place for test), the issue will be fixed on your site?

Hi Aleksey.

I checked the database and noticed that the "title" column has the problem. For example the word "Metálicas" should be writen "Metálicas". But it is "Metálicas".

The strange thing is that another column, "content", has the right characters codes (Tabela de acentos e caracteres especiais em HTML). I don't understand how a column can be correct while another is wrong.

* I am not sure if the image below is being displayed, but I marked red the wrong character, green the correct character and blue the one I manually changed, correcting the problem.

acd.png

It is impossible to manually correct them all... do you have any tips on how I can avoid this problem?

Thanks.
 
Back
Top