From: Shachar Shemesh Date: Mon, 20 Dec 2010 15:38:33 +0000 (+0200) Subject: Normalize output from aapt d X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/2d6b21cc6f967eb74fc19bcb9e3db384e387d408?ds=sidebyside Normalize output from aapt d Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed regardless of the content of the strings. Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf --- diff --git a/XMLNode.cpp b/XMLNode.cpp index 8551b0f..c0d7427 100644 --- a/XMLNode.cpp +++ b/XMLNode.cpp @@ -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"); }