Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: src/extensions/experimental/collator.cc

Issue 7033038: Make 'ignoreCase' works in collator. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/extensions/experimental/collator.cc
===================================================================
--- src/extensions/experimental/collator.cc (revision 7967)
+++ src/extensions/experimental/collator.cc (working copy)
@@ -153,6 +153,11 @@
bool ignore_case, ignore_accents, numeric;
if (ExtractBooleanOption(options, "ignoreCase", &ignore_case)) {
+ // Need to explicitly set the level to secondary to get case ignored.
Nebojša Ćirić 2011/05/20 16:46:57 Nit: Needs to...
+ // 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,
status);
if (U_FAILURE(status)) {
Property changes on: src/extensions/experimental/collator.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698