HI, I have a problem with this query
SELECT * FROM table WHERE `name` LIKE '%tést%'
the HMTL and the SQL table both have utf-8 encoding but unfortunately there is no mysql_set_charset('utf-8')
and I'm NOT able to use it.
I've tried with iconv("UTF-8", "ISO-8859-1", $name)
but the query matches only test
.
I want to match all of these : test, tést, tèst, tëst
(as it would work with mysql_set_charset
)
edit:
SET NAMES utf8
is nigher possible ... the database is with utf8 encoding, unfortunately the content is being filled from web without mysql_set_charset
nor SET NAMES
.
Currently if these functions are used the results are messed up.
version()
5.1.41-3ubuntu12.9
edit2:
when I use SET NAMES utf8
it matches only tést
and they look like tést
when I use iconv("UTF-8", "ISO-8859-1", $name)
it matches only test