Re: [xml] Wrong Behaviour Due to Fix to Bug #440159



On Thu, Mar 06, 2008 at 09:32:54AM +0530, Ashwin wrote:

   Hi,

            The  attached  files return an encoding error on parsing. The
   xmlfile  contains  a  reference  to  an  entity  in UTF-16 format, and
   ideally there should be no problems. On investigating I found that the
   problem   occurs   due  to  the  changes  made  for  bug  fix  #440159
   (http://bugzilla.gnome.org/show_bug.cgi?id=440159)    ,SVN    Revision
   3618(http://svn.gnome.org/viewvc/libxml2/trunk/encoding.c?r1=3545&r2=3
   618).  If  I revert the changes the parsing happens properly and there
   is no error.

  After some debugging by Bill, pinpointing the source of the problem,
yes it's a classical mistake one char is not one byte, it's a bit ironic
that we made it in code dedicated to encoding, sigh ... trivial patch
enclosed, I also add your test to the regression,

  thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

Attachment: encoding.patch
Description: Text document



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