I found my answer:
Set UTF-8 as the character set for all headers output by your PHP code
In every PHP output header, specify UTF-8 as the encoding:
header('Content-Type: text/html; charset=utf-8');
문제
I have a delete page, I am trying to get an alert message to popup If the delete operation was performed, Display. I want to show text message in alert box in Persian (Farsi) language, but This code is done but Persian characters do not display correctly. please help me What should I do?
echo '<script>';
echo 'alert("حذف");';
echo 'location.href="Delete Touristplace1.php"';
echo '</script>';
해결책
I found my answer:
Set UTF-8 as the character set for all headers output by your PHP code
In every PHP output header, specify UTF-8 as the encoding:
header('Content-Type: text/html; charset=utf-8');
다른 팁
You can use a meta tag for the HTML on which you want this alert,
you have set the character set which is suitable for persian language.
usually following works
charset="UTF-8"
if this doesn't work, use
charset="ISO-8859-1"