note 111948 added to class.domdocument

From: Date: Tue, 16 Apr 2013 13:01:48 +0000
Subject: note 111948 added to class.domdocument
Groups: php.notes 
Request: Send a blank email to php-notes+get-194494@lists.php.net to get a copy of this message
Even if DomDocument should handle UTF-8, i can't get it work with. A solution to get the correct characters into the DomDocument for any HTML source is : mb_convert_encoding($source, 'HTML-ENTITIES', $sourceEncoding); $sourceEncoding can depend on: - HTTP header Content-Type - HTML meta Content-Type - HTML meta charset - If nothing found, i hard code it using encoding found by the browser. Output is UTF-8 encoded with all special characters encoded with HTML &xxx; syntax ---- Server IP: 69.147.83.199 Probable Submitter: 5.254.137.196 ---- Manual Page -- http://php.net/manual/en/class.domdocument.php Edit -- https://master.php.net/note/edit/111948 Del: integrated -- https://master.php.net/note/delete/111948/integrated Del: useless -- https://master.php.net/note/delete/111948/useless Del: bad code -- https://master.php.net/note/delete/111948/bad+code Del: spam -- https://master.php.net/note/delete/111948/spam Del: non-english -- https://master.php.net/note/delete/111948/non-english Del: in docs -- https://master.php.net/note/delete/111948/in+docs Del: other reasons-- https://master.php.net/note/delete/111948 Reject -- https://master.php.net/note/reject/111948 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194494) next »