Make combobox accent insensitive

Hi !



I’m trying to make combobox’s text search be accent insensitive. The idea is to make ‘�l�phant’ match ‘elephant’ and vice versa.

The theoretical way to proceed is to convert the strings to unicode since unicode can correctly match the accented variations of a letter. I’ve done the theorectical bit here : jecodeavecmespieds.over-blog.com … 74922.html

But I’m having trouble bringing the theory into combobox. Any clue of how to get this through (I actually believe it should be integrated into the main combobox source once working since it’s a problem for many languages) ?


Hello,


it is possible to make combobox’s text search be accent insensitive by modifications in dhtmlxcombo.js, filterSelf method. Try to locate the following method and do the modifications that are written in comments:





dhtmlXCombo.prototype.filterSelf = function(mode)
{
var text=this.getComboText();
/the text variable should be converted using the regular expression/






for(var i=0; i<this.optionsArr.length; i++){


/this.optionsArr[i].text should be converted and used in the following method/
var z=filter.test(this.optionsArr[i].text);




}




Heh, I got that far :wink:
My problem is with the next  step

I think case insensetive search should be set by default.

I agree that accent insensitive should be the default in combo and in grid filters. Are you planning to include this in future releases?

Additional regexp and replace commands will affect performance. And this is unacceptable if a component contains thousands of records. We’ll consider this idea and possibly add functionalities in grid and combo that will allow to customize search regexp, but we won’t make filtering accent insensitive by default.

I am understand. If you could provide functionality to change the default mode that would be great! thanks for the information