Skip Menu |

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

Report information
The Basics
Id: 14815
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: MIROD [...] cpan.org
Requestors: ddascalescu [...] gmail.com
Cc:
AdminCc:

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



Date: Thu, 29 Sep 2005 03:45:00 -0700
From: Dan Dascalescu <ddascalescu [...] gmail.com>
To: bug-XML-Twig [...] rt.cpan.org
Subject: Line endings are not preserved in CDATA sections
With keep_encoding => 1, CR-LF pairs parsed in CDATA sections are turned into LFs. This may be a problem when outputting in binmode. Line endings in PCDATA sections are preserved (with keep_spaces =>1). Please find attached test case. Hope that helps, Dan Dascalescu http://www.brainbench.com/transcript.jsp?pid=102809

Message body is not shown because sender requested not to inline it.

[ddascalescu@gmail.com - Thu Sep 29 06:45:31 2005]: Show quoted text
> With keep_encoding => 1, CR-LF pairs parsed in CDATA sections are > turned into LFs. This may be a problem when outputting in binmode. > Line endings in PCDATA sections are preserved (with keep_spaces =>1).
Hi Dan, Thanks for the test case. I had a long explanation, that saddly got lost with a misplaced click :--( In short this bug is related to the fix to the long CDATA bug. I now use a different way to get the data in CDATA section, but one that gives me the data in UTF-8 (I believe, I have to test) and with normalized line-endings (http://xml.com/axml/target.html#sec-line-ends). A partial fix (available in the new devlopment version) is to only switch to using this way for long (over 1024 bytes) CDATA sections. This passes both the regression tests and your new test. I don't really see how I can fix this bug for "long" CDATA sections though. If I knew I would have used a better fix the last time! Any idea? __ mirod
The tests pass in 3.40, so closed. __ mirod