[xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-15 Thread Murray Cumming
Here is a simple test case that takes the text from an apparently-valid UTF-8 file, puts it in a text child node, and then writes the XML file out. But the XML file fails validation with xmllint with this error: ./output.xml:4: parser error : PCDATA invalid Char value 12 Am I doing something wrong

Re: [xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-14 Thread Daniel Veillard
On Wed, Sep 14, 2011 at 10:19:20AM +0200, Murray Cumming wrote: > On Wed, 2011-09-14 at 16:10 +0800, Daniel Veillard wrote: > > On Fri, Sep 09, 2011 at 04:30:45PM +0200, Murray Cumming wrote: > > > On Fri, 2011-09-09 at 10:21 -0400, Jason Viers wrote: > > > > On 9/9/2011 05:37, Murray Cumming wrote

Re: [xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-14 Thread Murray Cumming
On Wed, 2011-09-14 at 16:10 +0800, Daniel Veillard wrote: > On Fri, Sep 09, 2011 at 04:30:45PM +0200, Murray Cumming wrote: > > On Fri, 2011-09-09 at 10:21 -0400, Jason Viers wrote: > > > On 9/9/2011 05:37, Murray Cumming wrote: > > > > Here is a simple test case that takes the text from an apparen

Re: [xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-14 Thread Daniel Veillard
On Fri, Sep 09, 2011 at 04:30:45PM +0200, Murray Cumming wrote: > On Fri, 2011-09-09 at 10:21 -0400, Jason Viers wrote: > > On 9/9/2011 05:37, Murray Cumming wrote: > > > Here is a simple test case that takes the text from an apparently-valid > > > UTF-8 file > > > > Not all valid UTF-8 is valid i

Re: [xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-09 Thread Jason Viers
On 9/9/2011 05:37, Murray Cumming wrote: Here is a simple test case that takes the text from an apparently-valid UTF-8 file Not all valid UTF-8 is valid in XML. Only a subset, as defined in http://www.w3.org/TR/2008/REC-xml-20081126/#charsets Note that Form Feed (0xC) is not allowed. Your or

Re: [xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-09 Thread Murray Cumming
On Fri, 2011-09-09 at 10:21 -0400, Jason Viers wrote: > On 9/9/2011 05:37, Murray Cumming wrote: > > Here is a simple test case that takes the text from an apparently-valid > > UTF-8 file > > Not all valid UTF-8 is valid in XML. Only a subset, as defined in > http://www.w3.org/TR/2008/REC-xml-200

[xml] xmlSaveFormatFileEnc() creating invalid XML

2011-09-09 Thread Murray Cumming
Here is a simple test case that takes the text from an apparently-valid UTF-8 file, puts it in a text child node, and then writes the XML file out. But the XML file fails validation with xmllint with this error: ./output.xml:4: parser error : PCDATA invalid Char value 12 Am I doing something wrong