Commit 46c7ddd9 authored by cira@chromium.org's avatar cira@chromium.org

Landing http://codereview.chromium.org/7033038 for jshin.

Make 'ignoreCase' work in collator. 

BUG=28604
TEST=http://www.i18nl10n.com/chrome/coll.html
Review URL: http://codereview.chromium.org/7008023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b230249a
...@@ -153,6 +153,11 @@ v8::Handle<v8::Value> Collator::JSCollator(const v8::Arguments& args) { ...@@ -153,6 +153,11 @@ v8::Handle<v8::Value> Collator::JSCollator(const v8::Arguments& args) {
bool ignore_case, ignore_accents, numeric; bool ignore_case, ignore_accents, numeric;
if (ExtractBooleanOption(options, "ignoreCase", &ignore_case)) { if (ExtractBooleanOption(options, "ignoreCase", &ignore_case)) {
// We need to explicitly set the level to secondary to get case ignored.
// The default L3 ignores UCOL_CASE_LEVEL == UCOL_OFF !
if (ignore_case) {
collator->setStrength(icu::Collator::SECONDARY);
}
collator->setAttribute(UCOL_CASE_LEVEL, ignore_case ? UCOL_OFF : UCOL_ON, collator->setAttribute(UCOL_CASE_LEVEL, ignore_case ? UCOL_OFF : UCOL_ON,
status); status);
if (U_FAILURE(status)) { if (U_FAILURE(status)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment