有没有办法修复通过 phpquery::newDocument 运行此 html 标记后显示不正确的字符?原始文档中的 -Classics with modern Woman- 周围有预定的双引号,在使用 phpquery 创建新文档后最终显示不正确。
//Original document is UTF-8 encoded
$raw_html = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body><p>Mr. Smith of Bangkok celebrated the “Classics with modern Woman”.</p></body></html>';
print($raw_html);
$aNew_document = phpQuery::newDocument($raw_html);
print($aNew_document);
原始输出:曼谷的史密斯先生庆祝“经典与现代女性”。
新文件输出:曼谷的史密斯先生与现代女性一起庆祝“经典”。