note 100151 added to domdocument.loadhtml
| From: | murznn+php at gmail dot com | Date: | Tue, 28 Sep 2010 14:29:29 +0000 |
| Subject: | note 100151 added to domdocument.loadhtml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172767@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 91.144.186.119
----
Manual Page -- http://www.php.net/manual/en/domdocument.loadhtml.php
Edit -- https://master.php.net/note/edit/100151
Del: integrated -- https://master.php.net/note/delete/100151/integrated
Del: useless -- https://master.php.net/note/delete/100151/useless
Del: bad code -- https://master.php.net/note/delete/100151/bad+code
Del: spam -- https://master.php.net/note/delete/100151/spam
Del: non-english -- https://master.php.net/note/delete/100151/non-english
Del: in docs -- https://master.php.net/note/delete/100151/in+docs
Del: other reasons-- https://master.php.net/note/delete/100151
Reject -- https://master.php.net/note/reject/100151
Search -- https://master.php.net/manage/user-notes.php