Add encoding="utf-8" to the ?xml PD.

pull/193/head
Michael R Sweet 16 years ago
parent 51e76f4109
commit 046d57d917
  1. 5
      CHANGES
  2. 2
      mxml-node.c

@ -1,8 +1,11 @@
CHANGES - 2008-03-20
CHANGES - 2008-10-26
--------------------
CHANGES IN Mini-XML 2.5.1
- mxmlNewXML() now adds encoding="utf-8" in the ?xml directive
to avoid problems with non-conformant XML parsers that assume
something other than UTF-8 as the default encoding.
- Wrapping was not disabled when mxmlSetWrapMargin(0) was
called, and "<?xml ... ?>" was always followed by a newline
(STR #76)

@ -671,7 +671,7 @@ mxmlNewXML(const char *version) /* I - Version number to use */
char element[1024]; /* Element text */
snprintf(element, sizeof(element), "?xml version=\"%s\"?",
snprintf(element, sizeof(element), "?xml version=\"%s\" encoding=\"utf-8\"?",
version ? version : "1.0");
return (mxmlNewElement(NULL, element));

Loading…
Cancel
Save