Skip Menu |

This queue is for tickets about the XML-Tiny CPAN distribution.

Report information
The Basics
Id: 60285
Status: resolved
Priority: 0/
Queue: XML-Tiny

People
Owner: Nobody in particular
Requestors: mathieu [...] closetwork.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.04
Fixed in: (no value)



Subject: Xml-tiny pukes on BOM
If you make the mistake of editing a UTF8 XML file with Notepad on windows, it will save it with a BOM. Unfortunately, XML::Tiny dies with this message: Junk after end of document XML::Parser catches it fine. BOM: http://en.wikipedia.org/wiki/Byte_order_mark A test: DB<15> $p1 = new XML::Parser(Style => 'Debug'); DB<19> $p1->parse("<a><b c='1'></b></a>") \\ () a \\ (c 1) a // // DB<20> $p1->parse("\xef\xbb\xbf<a><b c='1'></b></a>") \\ () a \\ (c 1) a // // DB<22> x XML::Tiny::parsefile("_TINY_XML_STRING_\xef\xbb\xbf<a><b c='1'></b></a>") Junk after end of document DB<23> x XML::Tiny::parsefile("_TINY_XML_STRING_<a><b c='1'></b></a>") 0 ARRAY(0x1b76394) 0 HASH(0x1b762bc) 'attrib' => HASH(0x1b0fea4) empty hash 'content' => ARRAY(0x1b3f9b8) 0 HASH(0x1c89dc0) 'attrib' => HASH(0x1b3f9a0) 'c' => 1 'content' => ARRAY(0x1b40880) empty array 'name' => 'b' 'type' => 'e' 'name' => 'a' 'type' => 'e'
Thanks, fixed in 2.05. Also fixed for UTF-16 BOMs.
Subject: Re: [rt.cpan.org #60285] Xml-tiny pukes on BOM
Date: Sun, 15 Aug 2010 17:08:26 -0400
To: bug-XML-Tiny [...] rt.cpan.org
From: Mathieu Longtin <mathieu [...] closetwork.org>
Thanks! -- Mathieu Longtin 1-514-803-8977 On Fri, Aug 13, 2010 at 9:52 AM, David Cantrell via RT < bug-XML-Tiny@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=60285 > > > Thanks, fixed in 2.05. Also fixed for UTF-16 BOMs. >