diff options
| author | 2018-10-03 20:56:06 +0000 | |
|---|---|---|
| committer | 2018-10-03 20:56:06 +0000 | |
| commit | 5c5f0cdd0404a856638df69d6ef115192e57692c (patch) | |
| tree | a0224dd31400a94f37b2de01be71cf82d800dd6d /tools/aapt2/ResourceUtils.cpp | |
| parent | 8b7e1a88038ff5894bd523cb4caadfd12f58fe58 (diff) | |
| parent | 0ce89734d111ce3a9529254ccc9b8ef33fdeba73 (diff) | |
Merge "Fix failing Windows tests"
Diffstat (limited to 'tools/aapt2/ResourceUtils.cpp')
| -rw-r--r-- | tools/aapt2/ResourceUtils.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp index c48765b7b947..de00fcaea07b 100644 --- a/tools/aapt2/ResourceUtils.cpp +++ b/tools/aapt2/ResourceUtils.cpp @@ -38,6 +38,8 @@ using ::android::base::StringPrintf;  namespace aapt {  namespace ResourceUtils { +constexpr int32_t kNonBreakingSpace = 0xa0; +  Maybe<ResourceName> ToResourceName(      const android::ResTable::resource_name& name_in) {    ResourceName name_out; @@ -810,7 +812,7 @@ StringBuilder& StringBuilder::AppendText(const std::string& text, bool preserve_    Utf8Iterator iter(text);    while (iter.HasNext()) {      char32_t codepoint = iter.Next(); -    if (!preserve_spaces && !quote_ && iswspace(codepoint)) { +    if (!preserve_spaces && !quote_ && codepoint != kNonBreakingSpace && iswspace(codepoint)) {        if (!last_codepoint_was_space_) {          // Emit a space if it's the first.          xml_string_.text += ' ';  |