Unfortunately the characters that have already been added have been added using a different characterset. If you change the character set to latin1 and then issue your select (I am assuming latin1 was the previous default) you will see the entries correctly. I have put together a small demo of what I mean below.
Code:
mysql> create table charsettest(name varchar(20) character set utf8);
Query OK, 0 rows affected (0.04 sec)
mysql> desc charsettest;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
1 row in set (0.00 sec)
mysql> set names latin1;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into charsettest(name) values ('Allé');
Query OK, 1 row affected (0.00 sec)
mysql> select * from charsettest;
+-------+
| name |
+-------+
| Allé |
+-------+
1 row in set (0.00 sec)
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from charsettest;
+---------+
| name |
+---------+
| Allé |
+---------+
1 row in set (0.00 sec)
mysql> insert into charsettest(name) values ('Logroño');
Query OK, 1 row affected (0.00 sec)
mysql> select * from charsettest;
+----------+
| name |
+----------+
| Allé |
| Logroño |
+----------+
2 rows in set (0.00 sec)
mysql> set names latin1;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from charsettest;
+---------+
| name |
+---------+
| Allé |
| Logro?o |
+---------+
2 rows in set (0.00 sec)
Bookmarks