MySQL passenden unicode-Zeichen mit ascii-version

Ich bin mit MySQL 5.1.50 und haben eine Tabelle, die wie folgt aussieht:

organizations | CREATE TABLE `organizations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `url` text CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=25837 DEFAULT CHARSET=utf8 |

Das problem das ich habe ist, dass MySQL passenden unicode-Zeichen mit ascii-Versionen. Zum Beispiel, wenn ich Suche für ein Wort enthält ein 'é', es wird mit dem gleichen Wort, das ein 'e' statt, und Umgekehrt:

mysql> SET NAMES utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT id, name FROM `organizations` WHERE `name` = 'Universite de Montreal';
    +-------+-------------------------+
| id    | name                    |
+-------+-------------------------+
| 16973 | Université de Montreal  |
+-------+-------------------------+
1 row in set (0.01 sec)

Bekomme ich diese Ergebnisse sowohl von PHP und die Kommandozeile Konsole. Wie bekomme ich exakte übereinstimmungen aus meinem SELECT-Abfragen?

Dank!

InformationsquelleAutor user825466 | 2011-07-01
Schreibe einen Kommentar