2007-03-31, 03:35 PM
Hello all,
I have another dilemma here...I've brought it up before but it remains unsolved.
I have a custom searchform that allows you to enter search-criteria and with a tickbox define against which of the customfields the search is done.
Pretty easy thing to do once you just wrap the searchterm with %%....so no worries there...
Now...I have a number of fields like LASTNAME, FIRSTNAME etc. that do have diacritic characters...and these are not found with the search.
An example.... person's lastname is Mäki....now someone searches for him by using term Mäki...everything is fine....should you search for Maki or Maeki or anything like that....no go.
Soo.....at my work I've gone around this by using TRANSLATE('àèìòùỳ','aeiouy') and that's fine....but that's a function available in Hyperion suite.....not in regular SQL I believe.
Now is there anyone that can give me the code that I need to implement in my form that will turn at least the chars with the singlequote or doublequote on top, into their 'quoteless' equivalents (à=>a) on both the searchform as well as in the sql??? So basically....the code would translate on the fly both the search-term as well as the field in the database into it's 'quoteless' version.
So if someone searches for this person called Mäki, the system would bring up all records that meet criteria %Maki% or %Mäki%....the problem is that it should really be then I suppose also %Makì% or %Mäkì% or one of the many permutations.....shite...
anyone have a magic-formula/regexp/code to fix this?
cheers,
Kimmo
I have another dilemma here...I've brought it up before but it remains unsolved.
I have a custom searchform that allows you to enter search-criteria and with a tickbox define against which of the customfields the search is done.
Pretty easy thing to do once you just wrap the searchterm with %%....so no worries there...
Now...I have a number of fields like LASTNAME, FIRSTNAME etc. that do have diacritic characters...and these are not found with the search.
An example.... person's lastname is Mäki....now someone searches for him by using term Mäki...everything is fine....should you search for Maki or Maeki or anything like that....no go.
Soo.....at my work I've gone around this by using TRANSLATE('àèìòùỳ','aeiouy') and that's fine....but that's a function available in Hyperion suite.....not in regular SQL I believe.
Now is there anyone that can give me the code that I need to implement in my form that will turn at least the chars with the singlequote or doublequote on top, into their 'quoteless' equivalents (à=>a) on both the searchform as well as in the sql??? So basically....the code would translate on the fly both the search-term as well as the field in the database into it's 'quoteless' version.
So if someone searches for this person called Mäki, the system would bring up all records that meet criteria %Maki% or %Mäki%....the problem is that it should really be then I suppose also %Makì% or %Mäkì% or one of the many permutations.....shite...
anyone have a magic-formula/regexp/code to fix this?
cheers,
Kimmo