Transform project from windows-1256 to utf-8 charset, what's the right steps?
-
26-09-2019 - |
Question
I got a PHP & MySQL script that use windows-1256 charset, I now want to modify the whole script make it completely built on utf-8 charset. starting from mysql DataBase to PHP files.
what is the right steps to achive that's??!!
Note: I use non-Latin language in script (Arabic language).
Solution
On the database level, have a look at:
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 might want to have a look at complete php-arabic solution here:
OTHER TIPS
I found such solution:
PHP & MySQL: Creating a website in your local language smoothly
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow