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

前端 未结 3 1550
栀梦
栀梦 2020-12-19 06:22

My Table collation is \"utf8_general_ci\". If i run a query like:

SELECT * FROM mytable WHERE myfield = \"FÖÖ\"

i get results where:

<
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-19 07:10

    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/

提交回复
热议问题