mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
![]() 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. |
||
---|---|---|
.. | ||
libmbfl | ||
tests | ||
ucgendat | ||
common_codepoints.txt | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
gen_rare_cp_bitvec.php | ||
mb_gpc.c | ||
mb_gpc.h | ||
mbstring.c | ||
mbstring.h | ||
mbstring.stub.php | ||
mbstring_arginfo.h | ||
php_mbregex.c | ||
php_mbregex.h | ||
php_onig_compat.h | ||
php_unicode.c | ||
php_unicode.h | ||
rare_cp_bitvec.h | ||
unicode_data.h |