Skip to content

Commit

Permalink
fixed bug reported by Petr Pajas, in the absence of encoding UTF-8 sh…
Browse files Browse the repository at this point in the history
…ould

* xmlsave.c: fixed bug reported by Petr Pajas, in the absence of
  encoding UTF-8 should really be assumed. This may break if
  the HTTP headers indicates for example ISO-8859-1 since this
  then becomes a well formedness error.
Daniel
  • Loading branch information
Daniel Veillard committed Mar 31, 2005
1 parent 7331e5c commit 64354ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Thu Mar 31 17:20:32 CEST 2005 Daniel Veillard <[email protected]>

* xmlsave.c: fixed bug reported by Petr Pajas, in the absence of
encoding UTF-8 should really be assumed. This may break if
the HTTP headers indicates for example ISO-8859-1 since this
then becomes a well formedness error.

Thu Mar 31 16:57:18 CEST 2005 Daniel Veillard <[email protected]>

* SAX.c: fixed #172260 redundant assignment.
Expand Down
3 changes: 3 additions & 0 deletions xmlsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,9 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,

if ((buf == NULL) || (cur == NULL)) return;

if (encoding == NULL)
encoding = "UTF-8";

memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = doc;
ctxt.buf = buf;
Expand Down

0 comments on commit 64354ea

Please sign in to comment.