diff --git a/client/src/org/compiere/grid/ed/AutoCompletion.java b/client/src/org/compiere/grid/ed/AutoCompletion.java index 46e10a189f..7e8f428e7d 100644 --- a/client/src/org/compiere/grid/ed/AutoCompletion.java +++ b/client/src/org/compiere/grid/ed/AutoCompletion.java @@ -33,6 +33,7 @@ import org.compiere.swing.CComboBox; *
  • BF [ 1735043 ] AutoCompletion: drop down box is showed even if i press Caps *
  • FR [ 1820783 ] AutoCompletion: posibility to toggle strict mode *
  • BF [ 1820778 ] ESC(cancel editing) key not working if you are on VComboBox + *
  • FR [ 2552854 ] Combobox AutoCompletion should ignore diacritics */ public class AutoCompletion extends PlainDocument { private static final long serialVersionUID = 1L; @@ -262,13 +263,15 @@ public class AutoCompletion extends PlainDocument { } /** - * Checks if str1 starts with str2 (ignores case) + * Checks if str1 starts with str2 (ignores case, trim whitespaces, strip diacritics) * @param str1 * @param str2 * @return true if str1 starts with str2 */ - private boolean startsWithIgnoreCase(String str1, String str2) { - return str1.toUpperCase().startsWith(str2.toUpperCase()); + protected boolean startsWithIgnoreCase(String str1, String str2) { + String s1 = org.compiere.util.Util.stripDiacritics(str1.toUpperCase()).trim(); + String s2 = org.compiere.util.Util.stripDiacritics(str2.toUpperCase()).trim(); + return s1.startsWith(s2); } } \ No newline at end of file