Re: xmlSaveToFd: unexpected behavior while redirecting the 'stdout' stream to a file

Nick Wellnhofer <[email protected]>
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
On 03/04/2018 14:02, YuGiOhJCJ Mailing-List via xml wrote:
> 	printf("Content-Type: application/xhtml+xml;\n\n");

This operates on the stdout FILE pointer using buffered IO.

> 	ctxt = xmlSaveToFd(1, NULL, XML_SAVE_FORMAT);

This operates on the stdout file descriptor using unbuffered IO. You're mixing 
buffered and unbuffered IO.

Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.