String search with accented characters.

Paul Pichette

New Member
I would like to search a table field which contains accented characters.
Is there a way to specify that the search be accent-insensitive?

Just curious,

Paul
 
Exactly.

all accents like àÀéÉçè will make for a search to make a difference in a MATCHES function.

Progress allows you to setup a field as 'Case-Sensitive', but warn you of the adverse effects on dataservers and such, but there's no option to control accents.

I looked into a function CODEPAGE-CONVERT, but I can't seem to make it work for me. I'm not too knowledgeable about code pages, so I'm not even sure if this function is what I need.

Of course, I could do my own function that would parse a string and substitute any accents to replace them with the accent-free equivalent à - a, é - e, etc... This will be very slow performance for sure.

I would think some people must have faced this kind of request before no?
 
Disclaimer: I have not tested this so it might not work as I think - it is just a thought of mine!

I don't think it is a code page issue - IMHO it is a collation issue. Collation like code pages is a component relevant to internationalization. It gives each character in a code page a sort weight thus effectively defining the sort order. If the German Umlaut A has the same weight as A then sorting will treat them as if they were the same. Therefore you have different collations for different language regions which most obviously affects the sort order for special characters - like the German Umlaut A for example.

AFAIK the sort weight does not only affect sorting, it also affects whether characters are treated differently in string comparisons. Therefore I believe that picking the right collation could solve your problem. You need to be aware that the collation table is stored in the database and you can override it in data retrieval statements like FOR EACH.

Heavy Regards, RealHeavyDude.
 
Back
Top