Searchs without accent (and special character)

Searchs without accent (and special character)

Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

Hi,
I would like to search in French without accent, by example I could find "été" with searching "ete" or "été" or "éte"
It is possible with datatables ?

Thank you

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    Currently you need to use a plug-in such as this one although that removes all accents.

    This is an area that is going to be improved significantly for the next major release of DataTables (v2), although that is likely some months away.

    Allan

  • Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

    Yeahh, thank you, good job (I discover the whole site with plugins and extensions)

    Thanks for all

  • Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

    Ok but at this time, either I search with accents or without accents ?
    I don't understand ?

    thanks

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin
    Answer ✓

    No sorry - it is only without. The only option to allow search with both accents and without would be to use an orthogonal renderer that would return all of the options you want to search on. For example you could have the renderer return été ete to allow search on either.

    As I say, this is a known weakness in DataTables at the moment.

    Allan

  • Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

    Oh yeah good idea, i will do that with data-search :)

    Thank you

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1

    Hi,

    can anyone provide an example using orthogonal renderer i'm having the same problem..

    is this only possible per string été ete or we can have it for individual accentuate letter e é ?

    Thanks

  • Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

    I think, the best way it's to latinize words type in the search, and to create a orthogonal renderer without any accents, so the search is without accent and data-search too

    I will try soon

    https://github.com/dundalek/latinize

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1
    Answer ✓

    I will check that thanks

    The best solution I have found till now (work both way if you search é or e )
    https://jsfiddle.net/lenamtl/6t3mnwjz/

  • Ludoludo75Ludoludo75 Posts: 41Questions: 8Answers: 0

    Yes, it's the same way like latinize :)
    But without orthogonal renderer, so, it's the best way

    thanks for your sharing

This discussion has been closed.