Bug #7333 utf8 issue. character replace by question mark ?
Submitted: 15 Dec 2004 19:34 Modified: 15 Dec 2004 20:35
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:4.1.7 and 5.0.2 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[15 Dec 2004 19:34] [ name withheld ]
Description:
Hi,

The web browser display the following characters correctly, however MySQL unable to recognise the characters.  

é?¢
æµ?
è??

MySQL table displays:

é?¢
æµ?
è??

Table description:
ENGINE=MyISAM DEFAULT CHARSET=utf8

It seems like MySQL cannot recognise certain symbol.

How to repeat:
Insert the following characters through web into mysql table with Form charset utf8:

é?¢
æµ?
è??
[15 Dec 2004 20:35] Alexander Keremidarski
mysql> insert into bug7333 values('é?¢'), ('æµ'), ('è');
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from bug7333;
+--------+
| c      |
+--------+
| é?¢    |
| æµ     |
| è      |
+--------+
3 rows in set (0.00 sec)
[15 Dec 2004 21:18] [ name withheld ]
Try this simple code, copy and paste the characters, it doesn't work for me. The table still displays question mark "??".

<html>
<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">

<form accept-charset=utf-8 method=post action="">

<textarea name=ta cols=28 rows=6></textarea>
<input type=submit>
</form>

</html>

<?php
$data = $HTTP_POST_VARS['ta'];

echo "<br><br>characters: $data";

$conn = mysql_connect("localhost", "root", "test") or die(mysql_error());
mysql_select_db('bug', $conn) or die(mysql_error());

$q = "INSERT into bug7333 (message) values ('$data')";
mysql_query($q, $conn);

?>
[20 Oct 2010 6:25] Beibei Yang
I believe this is not a MySQL bug. I just referred to this article and successfully got rid of my question marks:

  http://www.bluetwanger.de/blog/2006/11/20/mysql-and-utf-8-no-more-question-marks/

Good luck!