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/util/StaticUtils.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index 6280b11..333b85c 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -1388,10 +1388,12 @@
 
     int minLength = Math.min(a.length, a2.length);
     for (int i = 0; i < minLength; i++) {
-      if (a[i] != a2[i]) {
-        if (a[i] < a2[i]) {
+      int firstByte = 0xFF & a[i];
+      int secondByte = 0xFF & a2[i];
+      if (firstByte != secondByte) {
+        if (firstByte < secondByte) {
           return -1;
-        } else if (a[i] > a2[i]) {
+        } else if (firstByte > secondByte) {
           return 1;
         }
       }

--
Gitblit v1.10.0