From 81478c69903dbcd299e2748a3a37857647f8fa70 Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Thu, 26 Mar 2009 03:24:33 +0000
Subject: [PATCH] Fix for issue#3880:Core matching rules don't support unicode characters

---
 opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
index 8e33811..73880dd 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
@@ -29,6 +29,7 @@
 
 
 import static org.opends.server.schema.SchemaConstants.*;
+import static org.opends.server.schema.StringPrepProfile.*;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -141,7 +142,7 @@
          throws DirectoryException
   {
     StringBuilder buffer = new StringBuilder();
-    buffer.append(value.toString().trim());
+    prepareUnicode(buffer, value, TRIM, NO_CASE_FOLD);
 
     int bufferLength = buffer.length();
     if (bufferLength == 0)
@@ -196,7 +197,7 @@
     // normalizing a full value with the exception that it may include an
     // opening or trailing space.
     StringBuilder buffer = new StringBuilder();
-    buffer.append(substring.toString());
+    prepareUnicode(buffer, substring, false, NO_CASE_FOLD);
 
     int bufferLength = buffer.length();
     if (bufferLength == 0)

--
Gitblit v1.10.0