summaryrefslogtreecommitdiff
path: root/UPGRADING
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-04-29 11:51:50 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-04-30 10:22:51 +0200
commitc4ad8beaa890b931031a5cf8a1d2d38550fca3af (patch)
tree05f544910ba3b8cc118fea231bce172d921c2cf1 /UPGRADING
parent707cb18276b3d344e37535b82359a797d285c35b (diff)
downloadphp-git-c4ad8beaa890b931031a5cf8a1d2d38550fca3af.tar.gz
Do not inherit LC_CTYPE locale from environment
Treatment of locales in PHP is currently inconsistent: The LC_ALL locale is set to "C", as is standard behavior on program startup. The LC_CTYPE locale is set to "", which will inherit it from the environment. However, the inherited LC_CTYPE locale will only be used in some cases, while in other cases it is necessary to perform an explicit setlocale() call in PHP first. This is the case for the locale-sensitive handling in the PCRE extension. Make things consistent by *never* inheriting any locales from the environment. LC_ALL, including LC_CTYPE will be "C" on startup. A locale can be set or inherited through an explicit setlocale() call, at which point the behavior will be fully consistent and predictable. Closes GH-5488.
Diffstat (limited to 'UPGRADING')
-rw-r--r--UPGRADING6
1 files changed, 6 insertions, 0 deletions
diff --git a/UPGRADING b/UPGRADING
index 96b9745d4c..982ebe635c 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -397,6 +397,12 @@ PHP 8.0 UPGRADE NOTES
. If the array returned by __sleep() contains non-existing properties, these
are now silently ignored. Previously, such properties would have been
serialized as if they had the value NULL.
+ . The default locale on startup is now always "C". No locales are inherited
+ from the environment by default. Previously, LC_ALL was set to "C", while
+ LC_CTYPE was inherited from the environment. However, some functions did not
+ respect the inherited locale without an explicit setlocale() call. An
+ explicit setlocale() call is now always required if you wish to change any
+ locale component from the default.
- tidy:
. The $use_include_path parameter, which was not used internally, has been