dongzong5017 2012-06-06 19:57
浏览 17
已采纳

phpQuery和重音字符

When I parse html using phpQuery, I got bad results with accentuated chars. The following code echo craps...

<?php 
    require_once 'phpQuery.php';
    $dom = phpQuery::newDocumentHTML('<p>é</p>');
    echo $dom->text(); //bad result
?>

Anybody know about accentuation in phpQuery?

I'm using netbeans on windows 2008 server with firefox.

  • 写回答

3条回答 默认 最新

  • doubi1624 2012-06-06 20:11
    关注

    Try to add on your page :

    header("Content-Type:text/html; charset=UTF-8");
    

    You welcome !

    And by the way, I believe you use Windows 2008 Server and not Windows 7 Server ...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?