View Full Version : Conversion of Turkish characters

02-29-2012, 01:54 PM

I am using a php-based software for a classified site. The language of the site is Turkish. There is a problem while searching via search bar of the software itself.

For example when a listing has a word "dikiş", I could only get the result when I type as it is. However, since some can type in capitals while searching, I need to get the same results when "DİKİŞ" is typed. (capital of i = İ(I with dot) and ş=Ş (capital)) When I contacted with the developer of the software for a solution of this problem, I have been told that as below;

"the software actually encodes most of the text in the
database to prevent problems with certain charsets causing the information to get corrupted.

Even if you made PHP changes to no longer encode the text in the database, that
may introduce "SQL injection" vulnerabilities, because the software expects the
text is in the database to be encoded and in a few places uses that encoding as the built-in prevention for SQL injection."

I am asking for your advice for a possible solution of this kind of searching. I am not a developer and thinking basically but it sounds me logical that there should be a way such as character converting during the search. I mean when someone types for the search, search engine may convert the character to its options (lower case of upper case) prior to call the information from the MySQL database. (=, =, =, =, etc)

Does that sound possible to you?

I really need some advice since it is the most importand of a site as you may agree and do not know how to handle with this situation.

Thanks in advance