On Sat, Jun 22, 2019 at 10:27 PM Bruce Weirdan <weir...@gmail.com> wrote:
> On Sat, Jun 22, 2019 at 6:32 PM Nikita Popov <nikita....@gmail.com> wrote: > > > > The normal str_starts_with() function is perfectly safe to use on UTF-8 > strings, > > Only if you assume strings to be normalized to the same form. Checking if > NFC > string starts with NFD substring by checking them bit by bit is going > to yield false negatives [1] > > [1] https://3v4l.org/4HgUL > That's correct, but not really relevant in the context of the discussion, as mbstring does not perform Unicode normalization, so mb_* functions wouldn't change anything about this. (Not that basic string operations should be performing implicit Unicode normalization...) Nikita