]> git.saurik.com Git - android/aapt.git/blobdiff - XMLNode.cpp
Merge changes I0ab47e2f,Ib8016996
[android/aapt.git] / XMLNode.cpp
index 57ff47a2595e1d30dc8f69a66c47894d95f12ccd..19248bf7fe37343ed64f1466a8d32f166bfd4791 100644 (file)
@@ -166,7 +166,7 @@ status_t hasSubstitutionErrors(const char* fileName,
     if (argCount > 1 && nonpositional) {
         SourcePos(String8(fileName), inXml->getLineNumber()).error(
                 "Multiple substitutions specified in non-positional format; "
-                "did you mean to add the formatted=\"true\" attribute?\n");
+                "did you mean to add the formatted=\"false\" attribute?\n");
         return NOT_ENOUGH_DATA;
     }
 
@@ -451,13 +451,15 @@ void printXMLBlock(ResXMLTree* block)
                     printf("=?0x%x", (int)value.data);
                 } else if (value.dataType == Res_value::TYPE_STRING) {
                     printf("=\"%s\"",
-                           String8(block->getAttributeStringValue(i, &len)).string());
+                            ResTable::normalizeForOutput(String8(block->getAttributeStringValue(i,
+                                        &len)).string()).string());
                 } else {
                     printf("=(type 0x%x)0x%x", (int)value.dataType, (int)value.data);
                 }
                 const char16_t* val = block->getAttributeStringValue(i, &len);
                 if (val != NULL) {
-                    printf(" (Raw: \"%s\")", String8(val).string());
+                    printf(" (Raw: \"%s\")", ResTable::normalizeForOutput(String8(val).string()).
+                            string());
                 }
                 printf("\n");
             }
@@ -502,7 +504,8 @@ void printXMLBlock(ResXMLTree* block)
             namespaces.pop();
         } else if (code == ResXMLTree::TEXT) {
             size_t len;
-            printf("%sC: \"%s\"\n", prefix.string(), String8(block->getText(&len)).string());
+            printf("%sC: \"%s\"\n", prefix.string(), ResTable::normalizeForOutput(
+                        String8(block->getText(&len)).string()).string());
         }
     }