Re: Bundling libxml2 and expat compatibility layer

From: Date: Sun, 04 May 2003 20:59:05 +0000
Subject: Re: Bundling libxml2 and expat compatibility layer
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-1242@lists.php.net to get a copy of this message
On Sun, May 04, 2003 at 11:21:19AM -0400, Sterling Hughes wrote: > On Sun, 2003-05-04 at 08:36, Adam Dickmeiss wrote: > > On Sat, May 03, 2003 at 12:11:14PM -0400, Sterling Hughes wrote: > > > Hi, > > > > > [snip] > > > > > 3) Proper unicode support > > What is it that Expat misses? > > > > Exactly what you said. :) It doesn't handle these encodings natively, > libxml2 does. Libxml2 can detect proper XML encodings, character sets, > and use the appropriate functions. It also natively detects and uses > iconv() to do encoding transformations. Its not that expat can't be > made to properly support unicode, but it can't be said that it does. Strickly speaking libxml2 doesn't do the conversions either. Both libs use iconv which is just fine. As I said a number times, the fact that Expat does not interpret encodings is due to ("bad") code in ext/xml. Will people still be able to configure PHP to use Expat for the basic functions (old xml) or will that wrapper disappear? I too am a little worried about performance. We have an application where many XML files are parsed to produce just one HTML page and we're probably not the only ones to do that. -- Adam > -Sterling > > > Expat itself MAY recognice the encoding in the header. However, the C > > code in PHP forces Expat to use some other fixed encoding by providing > > a NON-NULL pointer for XML_ParserCreate. > > > > Furthermore Expat allows you to plugin conversion handlers that > > allows for a substantial subset of characer sets out there. It is > > possible to use iconv for that purpose. (Expat call > > XML_SetUnknownEncodingHandler). > > > > Expat does not do much, but it does its job well and fast. > > > -- > "The three most dangerous things in the world are a programmer > with a soldering iron, a hardware type with a program patch and > a user with an idea." > - Unknown > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Dickmeiss mailto:adam@indexdata.dk http://www.indexdata.dk Index Data T: +45 33410100 Mob.: 212 212 66

« previous php.internals (#1242) next »