[xml] xmlSaveFormatFileEnc() doesn't always write encoding declaration.

The xmlSaveFormatFileEnc function accepts a NULL for the encoding,
though the documentation doesn't say what that would mean:

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
murrayc murrayc com

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