1. The table needs to be UTF-8.
2. The connection with the DB needs to be UTF-8 (it is preferred to have
this set as default in my.cnf).
3.
PHP must send UTF-8 data in the MySQL query: If the text you enter is
hardcoded inside the
PHP code, then the
PHP file, as you edit it in your
text editor, must be saved with the UTF-8 encoding. If the data comes from
an external application that talks to
PHP and submits data via GET/POST,
then it must do so in UTF-8 as well. And finally, if your text comes from a
web form that the user enters, the web page that contains the web form
itself, must be UTF-8, so the browser sends the data as UTF-8. The latter is
the most well-known "trouble maker" for the problem you're facing; It is
easily solved by adding the meta tag: <meta
http-equiv='Content-type'
content="text/
html; charset=utf-8" />. Also make sure that your web server
does not force a different encoding via
HTTP headers; Apache started doing
it at some version in the past, with the AddDefaultCharset directive.