FIXED: accent insensitive search
UberNote ROCKS!
Ubernote Feedback Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



FIXED: accent insensitive searchExpand / Collapse
Author
Message
Posted 2/6/2008 9:55:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/7/2008 10:18:36 AM
Posts: 9, Visits: 12
Hi,
I'm writing words in French with accents, and when I want to search an accentuated word, nothing's coming out!
Could you please fix this ?
And also could you please implement the search fonction in an accent insensitive way ? So that when I want to search "première", not also "première" is found, but also "premiere" without accent.
This should be done easily with a function such as:
String.prototype.stripaccents=function(){
var t=this;
t=t.replace(/À|Á|Â|Ã|Ä|Å|à|á|â|ã|ä|å/ig,'a');
t=t.replace(/Ò|Ó|Ô|Õ|Ö|Ø|ò|ó|ô|õ|ö|ø/ig,'o');
t=t.replace(/È|É|Ê|Ë|è|é|ê|ë/ig,'e');
t=t.replace(/Ç|ç/ig,'c');
t=t.replace(/Ì|Í|Î|Ï|ì|í|î|ï/ig,'i');
t=t.replace(/Ù|Ú|Û|Ü|ù|ú|û|ü/ig,'u');
t=t.replace(/ÿ/ig,'y');
t=t.replace(/Ñ|ñ/ig,'n');
return t;
}
With thanks and best regards,
Aymeric.
Post #113
Posted 2/6/2008 4:04:50 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 4/30/2008 11:36:36 AM
Posts: 23, Visits: 45
aymeric (2/6/2008)
Hi,
I'm writing words in French with accents, and when I want to search an accentuated word, nothing's coming out!
Could you please fix this ?
And also could you please implement the search fonction in an accent insensitive way ? So that when I want to search "première", not also "première" is found, but also "premiere" without accent.
This should be done easily with a function such as:
String.prototype.stripaccents=function(){
var t=this;
t=t.replace(/À|Á|Â|Ã|Ä|Å|à|á|â|ã|ä|å/ig,'a');
t=t.replace(/Ò|Ó|Ô|Õ|Ö|Ø|ò|ó|ô|õ|ö|ø/ig,'o');
t=t.replace(/È|É|Ê|Ë|è|é|ê|ë/ig,'e');
t=t.replace(/Ç|ç/ig,'c');
t=t.replace(/Ì|Í|Î|Ï|ì|í|î|ï/ig,'i');
t=t.replace(/Ù|Ú|Û|Ü|ù|ú|û|ü/ig,'u');
t=t.replace(/ÿ/ig,'y');
t=t.replace(/Ñ|ñ/ig,'n');
return t;
}
With thanks and best regards,
Aymeric.


Thanks again for the code snippet Aymeric, I have used it, now to get the database half of this equation going! You should see this in the upcoming release of Ubernote!

Shane
Post #122
Posted 2/7/2008 3:54:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/7/2008 10:18:36 AM
Posts: 9, Visits: 12
this is excellent news thank you Shane.
Post #123
Posted 3/31/2008 4:59:46 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 8/4/2008 3:57:45 PM
Posts: 91, Visits: 351
This is fixed in the 3.31.08 Update

UberNote Online Web Notes
Post #238
« Prev Topic | Next Topic »


PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:40pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 17 queries. Compression Enabled.