summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlwriter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlwriter.c b/xmlwriter.c
index 58ffab63..58445c84 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -541,8 +541,8 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version,
if (encoding != NULL) {
encoder = xmlFindCharEncodingHandler(encoding);
if (encoder == NULL) {
- xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
- "xmlTextWriterStartDocument : out of memory!\n");
+ xmlWriterErrMsg(writer, XML_ERR_UNSUPPORTED_ENCODING,
+ "xmlTextWriterStartDocument : unsupported encoding\n");
return -1;
}
}