Edit report at http://bugs.php.net/bug.php?id=41980&edit=1
ID: 41980 Comment by: roger21 at free dot fr Reported by: borys dot forytarz at gmail dot com Summary: encoding problem Status: Bogus Type: Bug Package: DOM XML related Operating System: Linux PHP Version: 5.2CVS-2007-07-13 Assigned To: rrichards Block user comment: N New Comment: i have a problem with loadHTMLFile that could be related, when i load an utf-8 encoded html page (that uses a meta tag for encoding and the header is utf-8 also) the result is a doubly utf8 encoded data and i need to use utf8_decode to get the actual utf8 encoded data, this is fairly crazy how loadHTMLFile check for encoding and why does it fails? Previous Comments: ------------------------------------------------------------------------ [2007-07-13 15:39:21] rricha...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The data in your input file (contents.tpl) is not UTF-8 (as you even see based on the mbstring result). You need to get it saved properly there, add an xml decl with the encoding specific to the top, or load the data into a string, convert to UTF-8 and load the document using the converted string via loadXML() or loadHTML(). ------------------------------------------------------------------------ [2007-07-13 13:13:39] borys dot forytarz at gmail dot com I have tried it - nothing changed. The same problem... ------------------------------------------------------------------------ [2007-07-13 10:48:08] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2007-07-12 21:20:20] borys dot forytarz at gmail dot com I've been working around this for half a day and figured out nothing what could be wrong. I have also checked many discussions and message boards and seen that there is a lot of people having the same problem and having no solution. So that's why I decided to report it as bug because I'm pretty sure that something is wrong and it is not my fault. ------------------------------------------------------------------------ [2007-07-12 21:09:05] tony2...@php.net Please figure out what's wrong with your file first before reporting any bugs. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=41980 -- Edit this bug report at http://bugs.php.net/bug.php?id=41980&edit=1