[libxml2] Fix invalid-source-encoding warnings in testWriter.c



commit 1ce1f7852ce4c131c22c147df28d66835835d5de
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Sat Jun 17 14:11:03 2017 +0200

    Fix invalid-source-encoding warnings in testWriter.c
    
    Use hex escapes instead of binary data in source file.

 doc/examples/testWriter.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c
index f662f76..82e8d3a 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");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]