diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index 8cf80dec5..cb80a9778 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; +import java.util.Locale; import android.content.Context; import android.content.Intent; @@ -1161,12 +1162,13 @@ public class FolderList extends K9ListActivity { mSearchTerm = searchTerm; FilterResults results = new FilterResults(); + Locale locale = Locale.getDefault(); if ((searchTerm == null) || (searchTerm.length() == 0)) { ArrayList list = new ArrayList(mFolders); results.values = list; results.count = list.size(); } else { - final String searchTermString = searchTerm.toString().toLowerCase(); + final String searchTermString = searchTerm.toString().toLowerCase(locale); final String[] words = searchTermString.split(" "); final int wordCount = words.length; @@ -1176,7 +1178,7 @@ public class FolderList extends K9ListActivity { if (value.displayName == null) { continue; } - final String valueText = value.displayName.toLowerCase(); + final String valueText = value.displayName.toLowerCase(locale); for (int k = 0; k < wordCount; k++) { if (valueText.contains(words[k])) { diff --git a/src/com/fsck/k9/activity/FolderListFilter.java b/src/com/fsck/k9/activity/FolderListFilter.java index 7ed58a77a..30a012600 100644 --- a/src/com/fsck/k9/activity/FolderListFilter.java +++ b/src/com/fsck/k9/activity/FolderListFilter.java @@ -2,6 +2,7 @@ package com.fsck.k9.activity; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import android.util.Log; import android.widget.ArrayAdapter; @@ -59,12 +60,13 @@ public class FolderListFilter extends Filter { } } + Locale locale = Locale.getDefault(); if ((searchTerm == null) || (searchTerm.length() == 0)) { ArrayList list = new ArrayList(mOriginalValues); results.values = list; results.count = list.size(); } else { - final String searchTermString = searchTerm.toString().toLowerCase(); + final String searchTermString = searchTerm.toString().toLowerCase(locale); final String[] words = searchTermString.split(" "); final int wordCount = words.length; @@ -73,7 +75,7 @@ public class FolderListFilter extends Filter { final ArrayList newValues = new ArrayList(); for (final T value : values) { - final String valueText = value.toString().toLowerCase(); + final String valueText = value.toString().toLowerCase(locale); for (int k = 0; k < wordCount; k++) { if (valueText.contains(words[k])) {