Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Rob Richards
Kasimier Buchcik wrote: really dont agree with overriding encoding and haven't heard any complaints yet. Then PHP doesn't use (hasn't implemented) the LS module. Correct and probably never will implement it (at least I have no plans on it), as it just over complicates things in a langu

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Kasimier Buchcik
Hi, On Wed, 2006-02-15 at 08:50 -0500, Rob Richards wrote: > After reading this thread and the comments in the bug report I have a > few questions/comments. > > Kasimier Buchcik wrote: > >> To me the most logical would be to do surgery on your input stream > >> you are modifying it by changing

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Rob Richards
After reading this thread and the comments in the bug report I have a few questions/comments. Kasimier Buchcik wrote: To me the most logical would be to do surgery on your input stream you are modifying it by changing its encoding, you should then also change or remove the encoding declarati

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Kasimier Buchcik
Hi, Bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=331266 Regards, Kasimier ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Daniel Veillard
On Tue, Feb 14, 2006 at 01:14:21PM +0100, Kasimier Buchcik wrote: > > To me the most logical would be to do surgery on your input stream > > you are modifying it by changing its encoding, you should then also > > change or remove the encoding declaration of the xmlDecl if present. > > We are do

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Kasimier Buchcik
Hi, On Tue, 2006-02-14 at 05:32 -0500, Daniel Veillard wrote: > On Tue, Feb 14, 2006 at 01:38:45AM -0800, Eric Seidel wrote: > > As I see it, my only options are: > > > > 1. Find (with your help) some way to hack around libxml's encoding- > > overrides-everything behavior. (This might mean det

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Daniel Veillard
On Tue, Feb 14, 2006 at 02:56:40AM -0800, Eric Seidel wrote: > On Feb 14, 2006, at 2:32 AM, Daniel Veillard wrote: > > To me the most logical would be to do surgery on your input stream > >you are modifying it by changing its encoding, you should then also > >change or remove the encoding declarat

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Eric Seidel
On Feb 14, 2006, at 2:32 AM, Daniel Veillard wrote: On Tue, Feb 14, 2006 at 01:38:45AM -0800, Eric Seidel wrote: As I see it, my only options are: 1. Find (with your help) some way to hack around libxml's encoding- overrides-everything behavior. (This might mean detecting and stripping

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Daniel Veillard
On Tue, Feb 14, 2006 at 01:38:45AM -0800, Eric Seidel wrote: > As I see it, my only options are: > > 1. Find (with your help) some way to hack around libxml's encoding- > overrides-everything behavior. (This might mean detecting and > stripping stream.) > 2. Ask you nicely to add an API for

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Eric Seidel
Daniel- On Feb 14, 2006, at 12:59 AM, Daniel Veillard wrote: On Tue, Feb 14, 2006 at 12:45:14AM -0800, Eric Seidel wrote: I'm now looking for a way to make libxml ignore the encoding="iso-8859-1" attribute, and instead rely on the utf-16 it autodetected (or which I can manually specify). x

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Daniel Veillard
On Tue, Feb 14, 2006 at 12:45:14AM -0800, Eric Seidel wrote: > I'm now looking for a way to make libxml ignore the > encoding="iso-8859-1" attribute, and instead rely on the utf-16 it > autodetected (or which I can manually specify). xmlCreatePushParserCtxt() doesn't have an encoding option,

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Eric Seidel
On Feb 14, 2006, at 12:33 AM, Daniel Veillard wrote: On Mon, Feb 13, 2006 at 03:40:48PM -0800, Eric Seidel wrote: We convert everything to UTF16, and pass around only UTF16 strings internally in WebKit (http://www.webkit.org). If that means we have to also removed the encoding information fro

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-14 Thread Daniel Veillard
On Mon, Feb 13, 2006 at 03:40:48PM -0800, Eric Seidel wrote: > We convert everything to UTF16, and pass around only UTF16 strings > internally in WebKit (http://www.webkit.org). If that means we have > to also removed the encoding information from the string before > passing it into libxml (

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-13 Thread Eric Seidel
On Feb 13, 2006, at 3:26 PM, Daniel Veillard wrote: On Mon, Feb 13, 2006 at 02:07:32PM -0800, Eric Seidel wrote: I'm reading in data off the network, converting it to utf16, and then passing it off to libxml2. In the parser4 adapted example, I'm reading ascii from a local file, expanding it t

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-13 Thread Daniel Veillard
On Mon, Feb 13, 2006 at 02:07:32PM -0800, Eric Seidel wrote: > I'm reading in data off the network, converting it to utf16, and then > passing it off to libxml2. In the parser4 adapted example, I'm > reading ascii from a local file, expanding it to integers > (effectively utf16) and then pas

[xml] Push-parsing Unicode with LibXML2

2006-02-13 Thread Eric Seidel
Greetings. I'm having difficulties with libxml2's push-parsing api and passing it data incrementally. I've adapted the parser4.c example to mimic what the code in my app is doing, and I'm wondering if one of you can help me spot my error (or help me determine if there is a bug in libxml2)