Re: Bundling libxml2 and expat compatibility layer

From: Date: Sun, 04 May 2003 22:28:55 +0000
Subject: Re: Bundling libxml2 and expat compatibility layer
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-1250@lists.php.net to get a copy of this message
On Sun, May 04, 2003 at 04:34:28PM -0400, Sterling Hughes wrote: > > > > Well, strictly speaking ;-), expat doesn't support UTF-16, libxml2 does. > > Exactly:) Expat supports UTF-16. But for whatever reason the coders > > of ext/xml didn't like it. > > > > No, expat itself does *not* support UTF-16 - not really. It allows > everything to be handled internally as UTF-16, but it requires you to be > unicode safe as well. libxml2 allows the document to be in UTF-16, > however, you can handle it as UTF-8 (or ISO-8859-1). Expat supports the parsing of an (external) file in UTF-16. So input encoding is UTF-16. Internally (from C) the representation is UTF-8 (output encoding). You can also compile Expat to use UTF-16 internally, but that's not what I want. I've just indexed (parsed) a file in UTF-16 encoding using Expat from C and I get UTF-8 strings in handlers. In other words Expat does exactly the same as libxml2 for encodings, provided that Expat is used properly. UTF-16 encoding was probably omitted from ext/xml due to confusion about encodings (Input/external versus output from PHP/C). -- Adam -- > > > > > 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. > > > > > > Don't worry about Dmitri's claims, they are as bogus as bogus can get. > > > Libxml2 is equally as fast as expat (its a matter of a few clock ticks > > > difference.) But, as I stated in my original message, both expat and > > > libxml2 will be supported - in fact, that's the whole point of the > > > bundling schema, and the expat compatibility layer (C level). > > A few hundred thousand ticks probably. Time will tell. It's > > a win-win when one can choose either. So I'm happy. > > > > Yeah, but a few hundred thousand ticks is nothing. > > > I can't seem to see your new stuff in CVS, yet. Right? > > > > Yep. Unless objections come up, I'll commit it before I head to amdam on tuesday. > > -Sterling > > > -- > "A business that makes nothing but money is a poor kind of business." > - Henry Ford > > > -- > 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 (#1250) next »