1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Files
archived-php-src/ext
Alex Dowad 4427b2e1ab Mark UTF-8 strings emitted by mbstring functions as valid UTF-8
We now have a couple of mbstring functions which have fast paths for
strings marked as 'valid UTF-8'. Later, we may likely have more. So
that these fast paths can be used more frequently, mark UTF-8 strings
emitted by mbstring as 'valid UTF-8'. This is always a correct thing
to do, because mbstring never returns invalid UTF-8 as the result of
a conversion (or similar) operation.

Internally, we do have a conversion mode which deliberately emits
invalid UTF-8 in some cases. (This is done to prevent unwanted matches
when we are converting strings to UTF-8 before performing matching
operations on them.) For such strings, don't set the 'valid UTF-8' flag.
It probably wouldn't hurt anything to set it, because strings generated
using that special conversion mode should *never* be returned to
userland, and I don't think we do anything with them which cares about
the IS_STR_VALID_UTF8 flag... but still, it would likely cause
confusion for developers.
2023-01-11 17:08:27 +02:00
..
2022-10-27 14:42:17 +01:00
2023-01-10 15:16:42 +00:00
2022-09-07 17:41:10 +02:00
2022-10-27 14:42:40 +01:00
2023-01-06 11:14:22 +01:00
2022-10-27 14:42:40 +01:00
2022-12-23 16:29:39 +00:00
2022-12-11 17:30:56 +01:00
2022-12-13 23:48:48 +00:00
2022-12-16 14:38:09 +01:00
2022-12-09 16:10:36 +01:00
2022-09-06 10:42:34 +01:00
2022-11-13 11:10:10 +01:00
2022-12-18 23:21:30 -07:00
2022-11-30 12:13:36 +01:00
2022-10-19 11:37:30 +02:00
2022-12-19 16:17:02 +01:00
2023-01-07 03:08:13 +00:00
2022-09-07 17:41:10 +02:00
2022-12-06 16:01:24 +01:00
2022-10-27 14:42:40 +01:00
2022-09-26 23:13:31 +02:00
2022-09-14 23:55:46 +02:00