You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use locale-independent alternatives to isalpha/isalnum/isctrl
- Avoid registering/detecting stream wrappers in locale-independent ways.
- Avoid this in libmagic for detecting magic file headers.
I don't believe these should be locale dependent.
- Avoid locale dependence for http/ftp/network protocols.
- Avoid locale dependence for Windows drive letter names in zend_virtual_cwd
- Make parse_url stop depending on locale
Related to https://bugs.php.net/bug.php?id=52923
iscntrl is locale-dependent which seems to corrupt certain bytes.
Somewhat related to https://wiki.php.net/rfc/strtolower-ascii
but I don't think most of these should have been locale-dependent in the first
place - the code may not have considered locales
E.g. on Linux, `setlocale(LC_ALL, 'de_DE');`
(if the locale is installed and it succeeds)
will have some values for alpha/cntrl in the range 128-256 where the C locale
has no values.
To avoid this locale-dependence in older php versions,
applications can set `setlocale(LC_CTYPE, 'C')`.
0 commit comments