I have a html file that want pars tags(Title,A,Name,...) and save them to a excel file . html tags is persian and when save them into excel file not save corectly. html file:
<html dir="rtl"><head><meta http-equiv="Content-Language" content="fa">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>ÈÇäß ÕæÊ.ÂãæÒÔ.ÇÏÈíÇÊ.ÚæÇãá Ýí ÇáäÍæ.ÇÓÊÇÏ ãÏÑÓ ÇÝÛÇäí.ÌáÓå 1</title>
<meta name="generator" M.H.SAFARZADE TEHRANI E_BANK_JAME_EMAMALI>
for example i want save title but not save corectly . title tag trust value is :
تدريس استاد مدرس افغاني
but save : ÈÇäß ÕæÊ.ÂãæÒÔ.ÇÏÈíÇÊ.ÚæÇãá Ýí ÇáäÍæ.ÇÓÊÇÏ ãÏÑÓ ÇÝÛÇäí.ÌáÓå 1
in php file i do this :
mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
header('Content-Type: text/html; charset=utf-8');
and :
$str = mb_convert_encoding($title, "UTF-8");
i can't find answer for my question in web.
please help me ...
thank you