MySQL DB selects records with and without umlauts. e.g: '.. where something = FÖÖ' MySQL DB selects records with and without umlauts. e.g: '.. where something = FÖÖ' mysql mysql

MySQL DB selects records with and without umlauts. e.g: '.. where something = FÖÖ'


SELECT * FROM table WHERE some_field LIKE ('%ö%'  COLLATE utf8_bin)


A list of the collations offered by MySQL for Unicode character sets can be found here:

http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html

If you want to go all-out and require strings to be absolutely identical in order to test as equal, you can use utf8_bin (the binary collation). Otherwise, you may need to do some experimentation with the different collations on offer.


For scandinavian letters you can use utf8_swedish_ci fir example.

Here is the character grouping for utf8_swedish_ci. It shows which characters are interpreted as the same.http://collation-charts.org/mysql60/mysql604.utf8_swedish_ci.html

Here's the directory listing for other collations. I'm no sure which is the used utf8_general_ci though. http://collation-charts.org/mysql60/