1

I received a website , first of all i will provide some explanation: Website PHP 5.3 Mysql Database and table charset LATIN1 Meta Tags used in files are windows 12...

Now first issue is that when i see index.php file in my PC Notepad++ it shows me Arabic there but when i see the same file in my windows server notepad++ it shows different encoding.

Second i have this website which is not showing data in Arabic in browser and all the data in database is in different format/garbage characters.

Any help

GI Joes
  • 27
  • 4

1 Answers1

2

Try using these commands;

ALTER DATABASE sdlc_demo CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE admin CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

How to convert an entire MySQL database characterset and collation to UTF-8?

Community
  • 1
  • 1
Sauced Apples
  • 1,163
  • 2
  • 14
  • 37
  • **Caution:** `CONVERT TO` should be used _only_ in the case where "A table is declared to be latin1 and correctly contains latin1 bytes, but you would like to change it to utf8." – Rick James Jan 31 '16 at 19:52