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).

Was it helpful?

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:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top