dhamaso / ufd

Automatically exported from code.google.com/p/ufd
GNU General Public License v2.0
0 stars 0 forks source link

UFD distinguishes accented characters #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a <select> with some options with Spanish accents, i.e.

<select id="test" name="test">
  <option value="1">Cabezón número 1</option>
  <option value="2">Campeón</option>
  <option value="3">Bombero</option>
  <option value="4">Cabezón número 2</option>
  <option value="5">Cabezón número 3</option>
</select>

2. Use UFD and try to search "Bombero": no problem, it founds it. 
3. Now search for "Cabezon" (without accent): nothing found

What is the expected output? What do you see instead?

It must show items 1, 4 and 5 (not distinguish between accentuated and 
non-accentuated letters).

What version of the product are you using? On what operating system?

Lastest version, Chrome on Linux

Original issue reported on code.google.com by ivan.ga...@gmail.com on 14 Nov 2014 at 3:59

GoogleCodeExporter commented 9 years ago
After some research, I've made a patch using the function latinize provided 
here: http://stackoverflow.com/a/9667817/299897

Just add the functions and change the line jquery.udf.js:1216:

return inStr.latinize()

Now you can search for tilde (accentuated) letters.

Original comment by ivan.ga...@gmail.com on 14 Nov 2014 at 4:27