This is a discussion on Searching Encoded Data With Special Letters within the MySQL Database forums, part of the Database Forums category; Hi, I am using a MySql database, and data is stored in longtext columns, encrypted (With encode()). There are some ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am using a MySql database, and data is stored in longtext columns, encrypted (With encode()). There are some Turkish characters in data, and they are displayed perfectly after data is decoded. However, I am not able to search these special letters in data: - Suppose there is the word "İstanbul" in a field named City (First letter is a special letter; caps i with dot - not I) - When I search data with: select decode(City,'decodestring') from Cities where decode(City,'decodestring') like '%stanbul%' query, my data returns fine since there is no special characters in my like comparison string. - However, when I use '%İstanbul%' instead of '%stanbul%', since there is a special letter, no rows are returned. I've tried different Character sets and collation properties but could not find a solution. As I've said I have NO problem with displaying the data, only searching. Thanks.. |
|
|||
|
== Quote from ist (saygin@gmail.com)'s article
> Hi, > I am using a MySql database, and data is stored in longtext columns, > encrypted (With encode()). > There are some Turkish characters in data, and they are displayed > perfectly after data is decoded. However, I am not able to search > these special letters in data: > - Suppose there is the word "İstanbul" in a field named City > (First letter is a special letter; caps i with dot - not I) > - When I search data with: > select decode(City,'decodestring') from Cities where > decode(City,'decodestring') like '%stanbul%' > query, my data returns fine since there is no special characters in my > like comparison string. > - However, when I use '%İstanbul%' instead of '%stanbul%', since there > is a special letter, no rows are returned. > I've tried different Character sets and collation properties but could > not find a solution. As I've said I have NO problem with displaying > the data, only searching. > Thanks.. can you send the output of this command to the group: show create table tablename; tablename of course refers to the Cities table. this will tell me what charset and collation you're using on the table. -- POST BY: lark with PHP News Reader |