Browse Source

Merge ce3db67e5f into 0f4f3e7fb5

pull/3787/merge
pacbypass 8 months ago
committed by GitHub
parent
commit
ab40920aaf
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      cpp/src/phonenumbers/utf/unicodetext.cc

+ 7
- 2
cpp/src/phonenumbers/utf/unicodetext.cc View File

@ -371,15 +371,20 @@ void UnicodeText::push_back(char32 c) {
if (UniLib::IsInterchangeValid(buf, len)) {
repr_.append(buf, len);
} else {
fprintf(stderr, "Unicode value 0x%x is not valid for interchange\n", c);
std::ostringstream oss;
oss << "Unicode value 0x" << std::hex << c << " is not valid for interchange";
LOG(WARNING) << oss.str();
repr_.append(" ", 1);
}
} else {
fprintf(stderr, "Illegal Unicode value: 0x%x\n", c);
std::ostringstream oss;
oss << "Illegal Unicode value: 0x" << std::hex << c;
LOG(WARNING) << oss.str();
repr_.append(" ", 1);
}
}
int UnicodeText::size() const {
return CodepointCount(repr_.data_, repr_.size_);
}


Loading…
Cancel
Save