문제

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

도움이 되었습니까?

해결책

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:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top