diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/CaseInsensitiveDictionary.java b/configadmin/src/main/java/org/apache/felix/cm/impl/CaseInsensitiveDictionary.java
index 214ca25..f05ff44 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/CaseInsensitiveDictionary.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/CaseInsensitiveDictionary.java
@@ -27,6 +27,7 @@
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Vector;
 
@@ -74,7 +75,7 @@
                 checkKey( key );
 
                 // check uniqueness of key
-                String lowerCase = ( ( String ) key ).toLowerCase();
+                String lowerCase = toLowerCase( key );
                 if ( internalMap.containsKey( lowerCase ) )
                 {
                     throw new IllegalArgumentException( "Key [" + key + "] already present in different case" );
@@ -156,8 +157,7 @@
             throw new NullPointerException( "key" );
         }
 
-        String stringKey = String.valueOf( key ).toLowerCase();
-        return internalMap.get( stringKey );
+        return internalMap.get( toLowerCase( key ) );
     }
 
 
@@ -198,7 +198,7 @@
         checkKey( key );
         value = checkValue( value );
 
-        String lowerCase = String.valueOf( key ).toLowerCase();
+        String lowerCase = toLowerCase( key );
         originalKeys.put( lowerCase, key );
         return internalMap.put( lowerCase, value );
     }
@@ -216,7 +216,7 @@
             throw new NullPointerException( "key" );
         }
 
-        String lowerCase = String.valueOf( key ).toLowerCase();
+        String lowerCase = toLowerCase( key );
         originalKeys.remove( lowerCase );
         return internalMap.remove( lowerCase );
     }
@@ -273,6 +273,13 @@
     }
 
 
+    static final String toLowerCase( Object keyObject )
+    {
+        final String key = ( String ) keyObject;
+        return key.toLowerCase( Locale.ENGLISH );
+    }
+
+
     static Object checkValue( Object value )
     {
         Class type;
diff --git a/configadmin/src/test/java/org/apache/felix/cm/impl/CaseInsensitiveDictionaryTest.java b/configadmin/src/test/java/org/apache/felix/cm/impl/CaseInsensitiveDictionaryTest.java
index d25a830..140e126 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/impl/CaseInsensitiveDictionaryTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/impl/CaseInsensitiveDictionaryTest.java
@@ -23,6 +23,7 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Vector;
 
 import junit.framework.TestCase;
@@ -31,6 +32,28 @@
 public class CaseInsensitiveDictionaryTest extends TestCase
 {
 
+    public void testLocaleIndependence() {
+        Locale defaultLocal = Locale.getDefault();
+        CaseInsensitiveDictionary dict = new CaseInsensitiveDictionary();
+        dict.put("illegal", "value1");
+        dict.put("ILLEGAL", "value2");
+        assertEquals(dict.get("illegal"), "value2");
+        assertEquals(dict.get("ILLEGAL"), "value2");
+
+        // validate "i" conversion with Turkish default locale
+        Locale.setDefault(new Locale("tr", "" ,""));
+        try {
+            dict = new CaseInsensitiveDictionary();
+            dict.put("illegal", "value1");
+            dict.put("ILLEGAL", "value2");
+            assertEquals(dict.get("illegal"), "value2");
+            assertEquals(dict.get("ILLEGAL"), "value2");
+        } finally {
+            Locale.setDefault(defaultLocal);
+        }
+    }
+
+
     public void testCheckValueNull()
     {
         // null which must throw IllegalArgumentException
