Charset/SQL
| From: | Oliver Block | Date: | Mon, 29 May 2006 15:00:36 +0000 |
| Subject: | Charset/SQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-41947@lists.php.net to get a copy of this message | ||
Hi list,
I get data from an HTML page that has charset UTF-8 (meta-element) and the
table has $encoding=mysql_client_encoding(...). Now I do a
$result = mysql_query(iconv("UTF-8", $encoding, $sql), $db_handle);
to change encoding of user data. $sql is the complete SQL query.
Might there be any problem that this code is not aware of? (I know that I
implicitly assume that the code can be converted from utf8 to $encoding which
is ISO-8859-1 for the database used. MySQL has Version 4.0.24)
tia,
Oliver