| Index: base/i18n/string_compare.cc
|
| diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc
|
| index 2851e7d2dce1e4a724af636ec448a2ac1d8eacd2..649c28119fe3a588380c516a5f115d814e93115c 100644
|
| --- a/base/i18n/string_compare.cc
|
| +++ b/base/i18n/string_compare.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "third_party/icu/source/common/unicode/unistr.h"
|
|
|
| namespace base {
|
| namespace i18n {
|
| @@ -17,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
|
| const string16& rhs) {
|
| UErrorCode error = U_ZERO_ERROR;
|
| UCollationResult result = collator.compare(
|
| - static_cast<const UChar*>(lhs.c_str()), static_cast<int>(lhs.length()),
|
| - static_cast<const UChar*>(rhs.c_str()), static_cast<int>(rhs.length()),
|
| + icu::UnicodeString(FALSE, lhs.c_str(), static_cast<int>(lhs.length())),
|
| + icu::UnicodeString(FALSE, rhs.c_str(), static_cast<int>(rhs.length())),
|
| error);
|
| DCHECK(U_SUCCESS(error));
|
| return result;
|
|
|