Re: How about a saveXHTML for the DOM?

From: Date: Thu, 09 Apr 2009 07:25:36 +0000
Subject: Re: How about a saveXHTML for the DOM?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-291275@lists.php.net to get a copy of this message
Michael Shadle wrote:
On Wed, Apr 8, 2009 at 8:58 PM, Michael A. Peters <mpeters@mac.com> wrote:
Yes it should - I believe php 6 is suppose to be much better at native UTF8. At least according to some blog I read somewhere (IE don't believe me without reservation, it's third hand knowledge at best)
afaik you're right, it's supposed to be fully unicode. or at least -was- however, how long until it is production stable... when i am sure someone can hack together a patch to make saveHTML unicode capable :p
I did a little reading on the issue and I don't think php 6 will fix it. The issue is with libxml2 - it mutilates utf8 when exporting to html and php function wraps the libxml2 function. The solution? I don't know - but perhaps using saveXML() and then using a translation tool (maybe xslt?) to convert to HTML. I actually had a function I wrote using preg_replace (started out as a wordpress plugin someone else wrote) but it could not properly handle cdata blocks - I'll see if I can find it. I don't use it anymore as I use saveHTML() now for html output. Maybe running iconv on the output would fix it?

« previous php.general (#291275) next »