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

This commit is contained in:
Michael R Sweet 2008-10-26 18:28:05 +00:00
parent 51e76f4109
commit 046d57d917
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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));