The xmlSaveFormatFileEnc function accepts a NULL for the encoding,
though the documentation doesn't say what that would mean:
http://xmlsoft.planetmirror.com/html/libxml-tree.html#xmlSaveFormatFileEnc

int     xmlSaveFormatFileEnc            (const char * filename, 
                                         xmlDocPtr cur, 
                                         const char * encoding, 
                                         int format)

It does seem to default to UTF-8 encoding when NULL is used, but NULL also 
means that the encoding declaration will not be written at the start of the 
XML file. Is that ever a good thing? It seems like a bug. Would it break 
anything to make it always write the encoding declaration? 

-- 
Murray Cumming
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to