[xml] endianness problem in regression suite



Hi,

Building libxml2 on Solaris/Sparc. In the tests I see a problem in the XML regression tests. From Makefile.am:

XMLtests : xmllint$(EXEEXT)
...
              echo Testing $$name ; \
              $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
              diff $(srcdir)/result/$$name result.$$name ; \

My tests.log says:

Testing utf16bom.xml
Binary files ./result/utf16bom.xml and result.utf16bom.xml differ

I've run xmllint by hand on result/utf16bom.xml. In emacs hexl-mode I see this in the original file

00000000: fffe 3c00 3f00 7800 6d00 6c00 2000 7600  ..<.?.x.m.l. .v.
00000010: 6500 7200 7300 6900 6f00 6e00 3d00 2200  e.r.s.i.o.n.=.".

And this is the xmllint output:

00000000: feff 003c 003f 0078 006d 006c 0020 0076  ...<.?.x.m.l. .v
00000010: 0065 0072 0073 0069 006f 006e 003d 0022  .e.r.s.i.o.n.=."

I'm told that feff == byte-order mark and that fffe == undefined character. I'm not quite sure if xmllint is wrong or if the use of diff is too simple. od has options to interpret multibyte characters, perhaps if both the file and the xmllint output is run through od the endianness can be handled and the test succeed if the file passes through xmllint correctly.

I would appreciate any information regarding if the xmllint output is sane or not, because if it's not I'll need to sink some time into debugging.

Regards,
  Nicolai Langfeldt




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