我有这个字符串:
dsfssdsdfdsf « ظ...ط¯ظˆظ†ط© ط£طظ...ط¯ ط§ظ„ط®ظˆط§ط¬ط©</p>
它以 UTF-8 编码,我从远程页面中提取它,我使用 file_get_contents 函数获取它的内容,远程页面编码为 UTF-8,
现在我想将此字符串插入其表编码为 latin1 的数据库中,以将其显示到具有字符集 ISO-8859-1 的 html 页面中,
我多次尝试将其编码从 UTF-8 转换为 ASCII 或 TO ISO-8859-1 以及其他编码(如 Windows-1256),但没有成功,字符串出现奇怪字符,请注意默认字符串包含阿拉伯字符,
编码失败结果示例:
dsfssdsdfdsf « Ã〜¸â€¦Ã〜·Â¯Ã〜¸Ë†Ã〜¸â€ Ã〜·© Ã〜 ········································································································································································ Ã,®Ã〜¸Ë†Ã〜·Ã,§Ã〜·Ã,¬Ã〜·Ã,©</p>
dsfssdsdfdsf « ãÏæäÉ ãÍãÏ ÇáÎæÇÌÉ