X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/1782ef54064d06ed12eea07fee7e1f802db84645..d9b0ea9f5bc75180ed375bf5d9542328e2e32db2:/ResourceTable.cpp diff --git a/ResourceTable.cpp b/ResourceTable.cpp index f9d2434..a9cbd11 100644 --- a/ResourceTable.cpp +++ b/ResourceTable.cpp @@ -39,6 +39,10 @@ status_t compileXmlFile(const sp& assets, root->removeWhitespace(false, NULL); } + if ((options&XML_COMPILE_UTF8) != 0) { + root->setUTF8(true); + } + bool hasErrors = false; if ((options&XML_COMPILE_ASSIGN_ATTRIBUTE_IDS) != 0) { @@ -480,22 +484,22 @@ static status_t compileAttribute(const sp& in, enumOrFlagsComment.append((attr.type&ResTable_map::TYPE_ENUM) ? String16(" be one of the following constant values.") : String16(" be one or more (separated by '|') of the following constant values.")); - enumOrFlagsComment.append(String16("

\n\n" + enumOrFlagsComment.append(String16("

\n
\n" "\n" "\n" "\n" - "")); + "")); } - enumOrFlagsComment.append(String16("\n")); + enumOrFlagsComment.append(String16("")); err = outTable->addBag(SourcePos(in->getPrintableSource(), block.getLineNumber()), myPackage, @@ -984,7 +988,7 @@ status_t compileResourceFile(Bundle* bundle, while ((code=block.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) { if (code == ResXMLTree::END_TAG) { - if (strcmp16(block.getElementName(&len), private_symbols16.string()) == 0) { + if (strcmp16(block.getElementName(&len), add_resource16.string()) == 0) { break; } } @@ -2505,7 +2509,7 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp& dest) // Iterate through all data, collecting all values (strings, // references, etc). - StringPool valueStrings; + StringPool valueStrings = StringPool(false, bundle->getUTF8()); for (pi=0; pi p = mOrderedPackages.itemAt(pi); if (p->getTypes().size() == 0) { @@ -2513,8 +2517,8 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp& dest) continue; } - StringPool typeStrings; - StringPool keyStrings; + StringPool typeStrings = StringPool(false, bundle->getUTF8()); + StringPool keyStrings = StringPool(false, bundle->getUTF8()); const size_t N = p->getOrderedTypes().size(); for (size_t ti=0; ti
ConstantValueDescription
ConstantValueDescription
")); + enumOrFlagsComment.append(String16("\n
")); enumOrFlagsComment.append(itemIdent); - enumOrFlagsComment.append(String16("")); + enumOrFlagsComment.append(String16("")); enumOrFlagsComment.append(value); - enumOrFlagsComment.append(String16("")); + enumOrFlagsComment.append(String16("")); if (block.getComment(&len)) { enumOrFlagsComment.append(String16(block.getComment(&len))); } - enumOrFlagsComment.append(String16("