0

Cold someone could explain why this returns true:

SELECT BINARY 'â' RLIKE '[™]';
SELECT BINARY 'é' RLIKE '[©]';

What could be the fix ? Is it some misconfiguration on my part?


UPDATE:

found that using (™|©) instead of [™©] would work as a first workaround

Stefan Rogin
  • 1,499
  • 3
  • 25
  • 41

1 Answers1

1

From the documentation:

Warning
The REGEXP and RLIKE operators work in byte-wise fashion, so they are not multi-byte safe and may produce unexpected results with multi-byte character sets.

Barmar
  • 741,623
  • 53
  • 500
  • 612
  • I understand now that `[]` operator is used for one byte match on each entry, and the `(|)` can be used for groups of characters so the multi-byte problem doesn't affect it's output. – Stefan Rogin Apr 25 '13 at 09:28