2

I am using the free version of WPGlobus(1.9.15) now I upgrade it to (1.9.24). First I work on localhost, its working perfectly on five languages (English, Spanish, French, German, Arabic) in menu, in content … means every where Then I upload it to the online server it also working perfectly on (English, Spanish, French, German) but not on Arabic.

The issue is when I translate a word (English to Arabic) in google translate and then paste Arabic word into menu its paste correctly like this

enter image description here

But when I saved it, the Arabic language only turned into these characters like this

enter image description here

You can see that only the Arabic language turned into this and its not working on my online server but its working perfectly in my localhost. I upgrade all plugins on the online server as well as in localhost. But the error comes only on the online server.

I hope you can understand my question.

Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51
deemi-D-nadeem
  • 2,343
  • 3
  • 30
  • 71

1 Answers1

0

You should change the database tables collations types to utf8_general_ci and also table fields collations change to utf8_general_ci.

You can do it by using ALTER command as:

ALTER DATABASE db_name CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE table_name CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE column_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

Or put this line in config.php

define('DB_COLLATE', 'utf8_general_ci');

You can use utf8_general_ci or utf8 or any other supported collation algorithm. See https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html

Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51
  • If the above solution does not work then see this one https://stackoverflow.com/questions/1294117/how-to-change-collation-of-database-table-column – Gufran Hasan Nov 05 '18 at 13:32
  • 1
    Changing the mysql charset to UTF8 makes a lot of sense. however I would recommend to go to `utf8mb4`, since mysql's `utf8` only covers a subset of UTF8. Also see this: https://stackoverflow.com/questions/30074492/what-is-the-difference-between-utf8mb4-and-utf8-charsets-in-mysql – Erik Kalkoken Nov 06 '18 at 13:09
  • @ErikKalkoken, Thanks for the suggestion :) – Gufran Hasan Nov 06 '18 at 13:10