summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-06-17 14:11:03 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2017-06-17 14:11:03 +0200
commit1ce1f7852ce4c131c22c147df28d66835835d5de (patch)
tree30ef610fa8e1bbc3d082b7eda5719f627b11a08b /doc
parent5f440d8cadea9f0d87fd3849366445029d47f528 (diff)
downloadlibxml2-1ce1f7852ce4c131c22c147df28d66835835d5de.tar.gz
Fix invalid-source-encoding warnings in testWriter.c
Use hex escapes instead of binary data in source file.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/testWriter.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c
index f662f767..82e8d3ab 100644
--- a/doc/examples/testWriter.c
+++ b/doc/examples/testWriter.c
@@ -102,7 +102,7 @@ testXmlwriterFilename(const char *uri)
* Please observe, that the input to the xmlTextWriter functions
* HAS to be in UTF-8, even if the output XML is encoded
* in iso-8859-1 */
- tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ tmp = ConvertInput("This is a comment with special chars: <\xE4\xF6\xFC>",
MY_ENCODING);
rc = xmlTextWriterWriteComment(writer, tmp);
if (rc < 0) {
@@ -139,7 +139,7 @@ testXmlwriterFilename(const char *uri)
}
/* Write a comment as child of ORDER */
- tmp = ConvertInput("<äöü>", MY_ENCODING);
+ tmp = ConvertInput("<\xE4\xF6\xFC>", MY_ENCODING);
rc = xmlTextWriterWriteFormatComment(writer,
"This is another comment with special chars: %s",
tmp);
@@ -177,7 +177,7 @@ testXmlwriterFilename(const char *uri)
}
/* Write an element named "NAME_1" as child of HEADER. */
- tmp = ConvertInput("Müller", MY_ENCODING);
+ tmp = ConvertInput("M\xFCller", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
if (rc < 0) {
printf
@@ -187,7 +187,7 @@ testXmlwriterFilename(const char *uri)
if (tmp != NULL) xmlFree(tmp);
/* Write an element named "NAME_2" as child of HEADER. */
- tmp = ConvertInput("Jörg", MY_ENCODING);
+ tmp = ConvertInput("J\xF6rg", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
if (rc < 0) {
printf
@@ -381,7 +381,7 @@ testXmlwriterMemory(const char *file)
* Please observe, that the input to the xmlTextWriter functions
* HAS to be in UTF-8, even if the output XML is encoded
* in iso-8859-1 */
- tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ tmp = ConvertInput("This is a comment with special chars: <\xE4\xF6\xFC>",
MY_ENCODING);
rc = xmlTextWriterWriteComment(writer, tmp);
if (rc < 0) {
@@ -418,7 +418,7 @@ testXmlwriterMemory(const char *file)
}
/* Write a comment as child of ORDER */
- tmp = ConvertInput("<äöü>", MY_ENCODING);
+ tmp = ConvertInput("<\xE4\xF6\xFC>", MY_ENCODING);
rc = xmlTextWriterWriteFormatComment(writer,
"This is another comment with special chars: %s",
tmp);
@@ -456,7 +456,7 @@ testXmlwriterMemory(const char *file)
}
/* Write an element named "NAME_1" as child of HEADER. */
- tmp = ConvertInput("Müller", MY_ENCODING);
+ tmp = ConvertInput("M\xFCller", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
if (rc < 0) {
printf
@@ -466,7 +466,7 @@ testXmlwriterMemory(const char *file)
if (tmp != NULL) xmlFree(tmp);
/* Write an element named "NAME_2" as child of HEADER. */
- tmp = ConvertInput("Jörg", MY_ENCODING);
+ tmp = ConvertInput("J\xF6rg", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
if (rc < 0) {
@@ -656,7 +656,7 @@ testXmlwriterDoc(const char *file)
* Please observe, that the input to the xmlTextWriter functions
* HAS to be in UTF-8, even if the output XML is encoded
* in iso-8859-1 */
- tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ tmp = ConvertInput("This is a comment with special chars: <\xE4\xF6\xFC>",
MY_ENCODING);
rc = xmlTextWriterWriteComment(writer, tmp);
if (rc < 0) {
@@ -689,7 +689,7 @@ testXmlwriterDoc(const char *file)
}
/* Write a comment as child of ORDER */
- tmp = ConvertInput("<äöü>", MY_ENCODING);
+ tmp = ConvertInput("<\xE4\xF6\xFC>", MY_ENCODING);
rc = xmlTextWriterWriteFormatComment(writer,
"This is another comment with special chars: %s",
tmp);
@@ -726,7 +726,7 @@ testXmlwriterDoc(const char *file)
}
/* Write an element named "NAME_1" as child of HEADER. */
- tmp = ConvertInput("Müller", MY_ENCODING);
+ tmp = ConvertInput("M\xFCller", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
if (rc < 0) {
printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
@@ -735,7 +735,7 @@ testXmlwriterDoc(const char *file)
if (tmp != NULL) xmlFree(tmp);
/* Write an element named "NAME_2" as child of HEADER. */
- tmp = ConvertInput("Jörg", MY_ENCODING);
+ tmp = ConvertInput("J\xF6rg", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
if (rc < 0) {
printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
@@ -920,7 +920,7 @@ testXmlwriterTree(const char *file)
* Please observe, that the input to the xmlTextWriter functions
* HAS to be in UTF-8, even if the output XML is encoded
* in iso-8859-1 */
- tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ tmp = ConvertInput("This is a comment with special chars: <\xE4\xF6\xFC>",
MY_ENCODING);
rc = xmlTextWriterWriteComment(writer, tmp);
if (rc < 0) {
@@ -955,7 +955,7 @@ testXmlwriterTree(const char *file)
}
/* Write a comment as child of ORDER */
- tmp = ConvertInput("<äöü>", MY_ENCODING);
+ tmp = ConvertInput("<\xE4\xF6\xFC>", MY_ENCODING);
rc = xmlTextWriterWriteFormatComment(writer,
"This is another comment with special chars: %s",
tmp);
@@ -992,7 +992,7 @@ testXmlwriterTree(const char *file)
}
/* Write an element named "NAME_1" as child of HEADER. */
- tmp = ConvertInput("Müller", MY_ENCODING);
+ tmp = ConvertInput("M\xFCller", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
if (rc < 0) {
printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
@@ -1001,7 +1001,7 @@ testXmlwriterTree(const char *file)
if (tmp != NULL) xmlFree(tmp);
/* Write an element named "NAME_2" as child of HEADER. */
- tmp = ConvertInput("Jörg", MY_ENCODING);
+ tmp = ConvertInput("J\xF6rg", MY_ENCODING);
rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
if (rc < 0) {
printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");