MySQL returns multiple results for one emoji

I am observing strange MySQL behavior for VARCHAR fields that contain one emulator. The join, database, and column are all utf8mb4 encoding and matching.

There is a table with a name categorieswith fields idand title. There are three lines, with the names 💳, 🍌 and 🎁.

When I run a query looking for a line with the title 💳, I get all the other lines with the same emojis, as if MySQL treated them as the same characters.

A request for an emoji credit card returning all other individual emoji rows

The expected behavior should be that only the string with is returned.

+4
source share

Source: https://habr.com/ru/post/1671937/


All Articles