note 100151 deleted from domdocument.loadhtml by danbrown
| From: | danbrown@php.net | Date: | Tue, 28 Sep 2010 15:39:30 +0000 |
| Subject: | note 100151 deleted from domdocument.loadhtml by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172769@lists.php.net to get a copy of this message | ||
Note Submitter: murznn+php at gmail dot com
----
mdmitry at gmail dot com, your method didn't help me.
I try to load HTML file with CP1251 cyrillic encoding and always got wrong cyrillic characters.
But after some hours I find the solution:
<?php
$doc->loadHTML('<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />' . $html);
?>
Hope that this help someone else.