Chromium Code Reviews| Index: base/string_util.cc |
| diff --git a/base/string_util.cc b/base/string_util.cc |
| index 2b9e1bcda47743f7a823954442799e7d9b345af7..0c7701c25edc58ffc74c1b9d25d186b399c6f4ef 100644 |
| --- a/base/string_util.cc |
| +++ b/base/string_util.cc |
| @@ -475,8 +475,15 @@ bool IsStringUTF8(const std::string& str) { |
| while (char_index < src_len) { |
| int32 code_point; |
| CBU8_NEXT(src, char_index, src_len, code_point); |
| - if (!base::IsValidCharacter(code_point)) |
| - return false; |
| + if (!base::IsValidCharacter(code_point)) { |
| + for (size_t i = 0; i < str.length(); ++i) { |
|
Mark Mentovai
2012/05/08 20:19:41
Dump the debugging code.
Robert Sesek
2012/05/15 16:57:51
Done.
|
| + printf("0x%x ", str[i]); |
| + } |
| + printf("\n"); |
| + LOG(INFO) << "STRING = <<<" << str << ">>>"; |
| + LOG(INFO) << "**** char_index = " << char_index << " // " << code_point; |
| + return false; |
| + } |
| } |
| return true; |
| } |