I have to make a search engine who search in a MySQL database in a "Name" column.
<div id="gt-res-wrap"> <div id="gt-res-content" class="almost_half_cell"> <div dir="ltr">The problem is thatmy"Name" columncontains
entrieswith accents(I am French).
I wantthatif someone searchesthe name "Nestlé", the functionsearches for the words"Nestlé" but
also"Nestle", "nestle" ...the caseshouldnot bea problem.
For now, the only solutionfound is to havea column"Tags", same as "Name" butwithoutthe
accents. With over 12,000entries, the duplicatecolumnis problematic forspaceand
redundancyhandling.
My firstidea was tochange thesearchentry foritignoresaccentsbutI
do not seehow.
Thank you in advance</div> </div> <div id="gt-res-tools"> <div id="gt-src-tools-l"></div> <div id="gt-res-tools-r"> <div id="gt-res-rate" aria-label="Donner son avis sur la traduction" data-tooltip="Donner son avis sur la traduction"
data-tooltip-align="t,c"> <div class="goog-inline-block goog-toolbar-menu-button" title="" role="button" tabindex="0" aria-haspopup="true"> <div class="goog-inline-block goog-toolbar-menu-button-outer-box"> <div class="goog-inline-block goog-toolbar-menu-button-inner-box">
<div class="goog-inline-block goog-toolbar-menu-button-caption"></div> </div> </div> </div> </div> </div> </div> </div>
Saesee
Member
33 Points
26 Posts
Search engine with support of accents or not
Feb 14, 2012 02:49 PM|LINK
Hi,
I have to make a search engine who search in a MySQL database in a "Name" column.
<div id="gt-res-wrap"> <div id="gt-res-content" class="almost_half_cell"> <div dir="ltr">The problem is that my "Name" column contains entries with accents (I am French).I want that if someone searches the name "Nestlé", the function searches for the words "Nestlé" but also "Nestle", "nestle" ... the case should not be a problem.
For now, the only solution found is to have a column "Tags", same as "Name" but without the accents. With over 12,000 entries, the duplicate column is problematic for space and redundancy handling.
My first idea was to change the search entry for it ignores accents but I do not see how.
Thank you in advance</div> </div> <div id="gt-res-tools"> <div id="gt-src-tools-l"></div> <div id="gt-res-tools-r"> <div id="gt-res-rate" aria-label="Donner son avis sur la traduction" data-tooltip="Donner son avis sur la traduction" data-tooltip-align="t,c"> <div class="goog-inline-block goog-toolbar-menu-button" title="" role="button" tabindex="0" aria-haspopup="true"> <div class="goog-inline-block goog-toolbar-menu-button-outer-box"> <div class="goog-inline-block goog-toolbar-menu-button-inner-box"> <div class="goog-inline-block goog-toolbar-menu-button-caption"></div> </div> </div> </div> </div> </div> </div> </div>
pranavkm
Participant
796 Points
106 Posts
Re: Search engine with support of accents or not
Feb 14, 2012 05:43 PM|LINK
Perhaps this Stackoverflow post would help - http://stackoverflow.com/questions/7126527/problem-with-accent-insensitive-searches
Saesee
Member
33 Points
26 Posts
Re: Search engine with support of accents or not
Feb 14, 2012 09:31 PM|LINK
Thanks, I will search in this direction tomorrow at work, I don't remember in what collation my DB is for now.
EDIT : The collation utf8_general_ci can search with or without accents. Thanks a lot