getID3() ASCII and UTF-8


getID3() ASCII and UTF-8

我需要帮助编码"Title"标记。我有一个带有特殊字符的名字,比如"Ş,š,č,ř,ž,ý,á,í,é",在demo.brows.php中正在工作。这是我的代码,我不知道,问题出在哪里,你能帮我吗?:)感谢

<?php
require_once('getid3.php');
$PageEncoding = 'UTF-8';
$getID3 = new getID3;
$getID3->setOption(array('encoding' => $PageEncoding));
$FullFileName = "test.webm";
$ThisFileInfo = $getID3->analyze($FullFileName);
getid3_lib::CopyTagsToComments($ThisFileInfo);
echo '<html><head>';
echo '<title>getID3() - (sample script)</title>';
echo '<meta http-equiv="Content-Type" content="text/html;charset='.$PageEncoding.'" />';
echo '</head><body>';
echo htmlentities(!empty($ThisFileInfo['comments_html']['title'])?implode('<br>', $ThisFileInfo['comments_html']['title']) : chr(160));
echo '</body></html>';
?>

资源是:"V zajet&#237;d&#333;mon&#367;"
原文为:"V zajetí;dé;monů;"
我尝试iconv();和utf8_encode();不要工作。感谢

您自己对结果调用htmlentities。此调用将变音符号转换为相应的HTML实体。

请改用htmlspecialchars