No, it's because the regex engine expects Unicode code points (the result of decode), not UTF-8 (what MySQL returned).
It has nothing to do with backwards compatibility, or with being an old language. e.g. Java's regex library similarly expects chars, not bytes.
In reply to Re^2: Matching/replacing a unicode character only works after decode()
by ikegami
in thread Matching/replacing a unicode character only works after decode()
by FloydATC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |