我是 php 的新手,我有一个脚本可以从一些波斯音乐网站获取信息。
我从网站获取波斯语字符有问题:
$this->fa_artist = $html->find('div.main-post', 0)->find('p', 0)->find('b', 1)->plaintext;
file_put_contents('fa_artist.txt', $this->fa_artist);
通过 html 链接在 fa_artist 中保存波斯艺术家姓名
名称是:امیر علی
但我看到了这个序列:
امیرعلی
在文件中
如何将其保存为波斯语字符?