Convert project from windows-1256 to utf-8 charset, what are the right steps?

I have a PHP and MySQL script that use Windows-1256 encoding, now I want to change the whole script so that it is completely built on utf-8 encoding. starting with mysql DataBase to PHP files.

What are the right steps to achieve this? !!

Note. I am using non-latin language in script (arabic language).

0
source share
2 answers

At the database level, look:

As for your html pages, use this meta tag:

 <meta charset=utf-8 /> 

And you can also use this header from php:

 header('content-type: text/html charset=utf-8'); 

Or you can see the complete php-arabic solution here:

+3
source

Source: https://habr.com/ru/post/904257/


All Articles