php-src/ext/mbstring
Niels Dossche f81370847c
Fix GH-13815: mb_trim() inaccurate $characters default value (#13820)
Because the default characters are defined in the stub file, and the
stub file is UTF-8 (typically), the characters are encoded in the string
as UTF-8. When using a different character encoding, there is a mismatch
between what mb_trim expects and the UTF-8 encoded string it gets.

One way of solving this is by making the characters argument nullable,
which would mean that it always uses the internal code path that has the
unicode codepoints that are defaulted actually stored as codepoint
numbers instead of in a string.

Co-authored-by: @ranvis
2024-04-24 09:07:55 +02:00
..
libmbfl [skip ci] Sync file permissions in Git repository 2024-02-20 17:58:47 +01:00
tests Fix GH-13815: mb_trim() inaccurate $characters default value (#13820) 2024-04-24 09:07:55 +02:00
ucgendat Optimize mb_str{,im}width for performance 2021-09-29 18:19:01 +02:00
common_codepoints.txt Improve mb_detect_encoding accuracy for text containing vowels with macrons 2023-08-25 12:09:55 +02:00
config.m4 Use optimized implementation of mb_strcut for Japanese mobile vendor UTF-8 variants 2023-12-07 20:37:15 +02:00
config.w32 Fix GH-13968: Build failed when with --enable-mbregex on MSVC (#13971) 2024-04-16 22:33:49 +02:00
CREDITS
gen_rare_cp_bitvec.php Mark globals as const (#10303) 2023-01-23 13:46:58 +00:00
mb_gpc.c Add request_parse_body() function 2024-02-08 12:08:07 +01:00
mb_gpc.h Remove unused 'to_language' and 'from_language' struct fields 2022-08-16 16:43:26 +02:00
mbstring.c Fix GH-13815: mb_trim() inaccurate $characters default value (#13820) 2024-04-24 09:07:55 +02:00
mbstring.h Take order of candidate encodings into account when guessing text encoding 2023-05-16 07:01:07 -07:00
mbstring.stub.php Fix GH-13815: mb_trim() inaccurate $characters default value (#13820) 2024-04-24 09:07:55 +02:00
mbstring_arginfo.h Fix GH-13815: mb_trim() inaccurate $characters default value (#13820) 2024-04-24 09:07:55 +02:00
php_mbregex.c Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) 2022-07-08 14:47:46 +02:00
php_mbregex.h Declare ext/mbstring constants in stubs (#8798) 2022-06-23 17:34:08 +02:00
php_onig_compat.h
php_unicode.c Implement conditional casing for Greek letter sigma when title-casing text 2023-01-12 17:41:11 +02:00
php_unicode.h Speed boost for mb_stripos (when not using UTF-8) 2022-12-18 15:31:20 +02:00
rare_cp_bitvec.h Improve mb_detect_encoding accuracy for text containing vowels with macrons 2023-08-25 12:09:55 +02:00
unicode_data.h Update Unicode tables to 14.0.0 2021-09-20 09:58:20 +02:00