Re: [xml] newline in xmlTextWriter on win32



Hello,

On Wed, 11 Aug 2004, Igor Zlatkovic wrote:
This conversion done by the C runtime has been deactivated in libxml on
purpose. The problem was that under some bizarre conditions,
xmlParseFile() followed by a xmlSaveFile() modified the data. It
replaced every \n with \r\n, even if it allready was a \r\n, ending up
with \r\r\n. One did the read-write again and it became \r\r\r\n.

Hmm.. this is interesting since according to XML specification (as was
pointed out recently in an other message on this list), xmlParseFile()
should have converted all \r\n sequences in the input file to \n.  Then,
when the file was output through xmlSaveFile() the C library would convert
all of the single \n characters to the \r\n sequence.

May I ask what sort of bizarre conditions caused the duplication?  The
change to binary write mode occurred in version 1.107 of xmlIO.c (20 Jul
2003).  I checked the mailing list archive around that date and didn't see
any discussion on this.  If there was any, could you point me in that
direction?

Thanks,
Michael Culbertson



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