【发布时间】:2016-06-14 13:28:18
【问题描述】:
从 PHP 5 升级到 7 后,我的 XML 文件中的 Chrome 出现错误:https://media.mostrami.pl/feed/zanox.xml?asdfsadfa。
error on line 148745 at column 26: Input is not proper UTF-8, indicate encoding !
Bytes: 0xC4 0x87 0x20 0x6A
我使用 xmllint 验证了文件并且没有收到任何错误。 我很确定内容是 UTF-8 格式(在 PHP5 中运行良好,由 xmllint 验证,由文件 -I xml_filename 检查)
怎么了?
【问题讨论】:
-
Error: "Input is not proper UTF-8, indicate encoding !" using PHP's simplexml_load_string 的可能重复项检查此内容以确定它是否回答了您的问题。
-
@dlporter98 我很确定内容是 UTF-8 格式(在 PHP5 中运行良好,由 xmllint 验证,由文件 -I xml_filename 检查)
-
“148745 at column 26”的违规字符是什么。我很确定这个字符不是 UTF-8
-
第 148745 行是:"
-
尝试在编辑器中打开文件--查看当编辑器设置为以 UTF-8 显示时,该行的字符是否正常显示。