"Re: [xml] xmlParseChunk with UTF-16LE fails on special occasion"



Hi,

Daniel Veillard wrote:

On Fri, Nov 28, 2003 at 04:47:16PM +0100, Kasimier Buchcik wrote:
 

This seems still somehow inconsistent to me, since the parser will not take the 
declared encoding if all data is processed with the first chunk.

Does anybody have a hint on how to let the push parser eat UTF-16LE regardless of
the declared encoding - if this is possible at all?
   


 Hum, 

Can you restate cleanly what the problem is.
 


Yes: I have an application with a XML-document hold by a DOMString 
encoded in UTF-16LE and
need it to be parsed with the push parser.

You have an UTF-16 entity. It's labelled with encoding= which is
not compatible with UTF-16. That encoding could be ignored 
if you passed the real encoding used "UTF-16" at parser creation.
 

Yes, yes, yes :-) You mean I can give the context I get from 
"xmlCreatePushParserCtxt" an UTF-16LE
encoding handler and I would get my lovely DOM, regardless of the 
declared encoding? If that works, it would be the solution for my little 
needs ;-)

That how HTTP encoding information in header are used to override
the encoding= declaration is availble. That should work. Still
the internal format will be UTF-8 once parser.
http://xmlsoft.org/encoding.html

Daniel
 

Daniel, please don't say again that "the internal format will be UTF-8" 
to me, I have the tourret-syndrom
and I start to think that you have the burden to say "the internal 
format will be UTF-8" in every mail :-D .
Welcome in tourett-land ;-)
(I had a funny day today so don't blame me for joking)

Thanks for the help,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]