On 2006-04-01, at 13:17, Octavian Rasnita wrote:

Hi,

Is it possible to create a query that searches for records which contains
words with special chars and with their english correspondents?

For example, if a user searches for "mata", I want to return all the records
that contain the words:

mata
măta
mâţa
mâţă

(just like Google does).

Is it possible with MySQL, or I need to create all the possible combinations
in the client program, then search for all those words?

        Use REGEX search with collation patterns - that is symbols
 that the regular expression engine of MySQL will expand into all the
letters. The syntax is explained in great detail in the manual - building
 a regular expression for that kind of search should be easy - simply
use the letters where the pattern shan't change and collation constructs
 in places where you expect variation (like [ăââ]). I'm sure only
some of the letters of your national alphabet have such variations, most should be
 stable, that is, unchanging. You could use alternative patterns
 with OR according to how often a letter "mutates" (crunch a
 dictionary) - put those more stable in front of REGEX expression. HTH.


--
Seks, seksić, seksolatki...<uri: news:pl.soc.seks.moderowana > <~| { A.A }|
When facing my demons, I clothe and feed them and I smile, yes, I smile,
As they're taking me over! End of the night never comes to quickly for me! https://hyperreal.info | https://kanaba.info |=> "Gościu! Szanuj Zieleń!"


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to