Posted by James on 03/21/06 23:48
In oracle I can do the following:
select CONVERT(COLUMNOFNAMES,'US7ASCII') from mytable --
It will take a name like Albrecht Dürer and change it into Albrecht
Durer and is useful in where clauses where you do not know if a user is
going to enter u or ü -- I convert the user input into Durer as well
as the column and query against it and get hits ........ very useful.
I can't seem to get something similar working with MySQL --
where ( convert(COLUMNOFNAMES using swe7) like '%durer%'
produces no hits -- I ran a select and it seemed to be convert the ü
into a question mark .... my default character set is latin1 - the
characters are displaying ok in the php pages.
Anybody got a clue if there is anyway to get this working --
essentially diacritic insensative searching. Working great in Oracle
-- but only because of the way the US7ASCII set maps characters like ü
on u ....
[Back to original message]
|