Skip to content

Commit 7e10870

Browse files
committed
notes to UPGRADING
1 parent 3950271 commit 7e10870

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

UPGRADING

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ PHP 7.1 UPGRADE NOTES
117117
========================================
118118
6. New Functions
119119
========================================
120+
- Core:
121+
. Added sapi_windows_cp_set(), sapi_windows_cp_get(), sapi_windows_cp_is_utf8(),
122+
sapi_windows_cp_conv() for codepage handling.
120123

121124
========================================
122125
7. New Classes and Interfaces
@@ -153,6 +156,48 @@ PHP 7.1 UPGRADE NOTES
153156
========================================
154157

155158
- Core:
159+
. Support for long and UTF-8 path;
160+
161+
If an application is UTF-8 conform, no further action is required. For
162+
applications depending on paths in non UTF-8 encodings for I/O, an explicit
163+
INI directive has to be set. The encoding INI settings check relies on the
164+
order in the core:
165+
- internal_encoding
166+
- default_charset
167+
- zend.multibyte
168+
169+
Several functions for codepage handling were itroduced:
170+
- sapi_windows_cp_set() to set the default codepage
171+
- sapi_windows_cp_get() to retrieve the current codepage
172+
- sapi_windows_cp_is_utf8()
173+
- sapi_windows_cp_conv() to convert between codepages, using iconv()
174+
compatible signature
175+
These functions are thread safe.
176+
177+
The console output codepage is adjusted depending on the encoding used in
178+
PHP. Depending on the concrete system OEM codepage, the visible output
179+
might or might be not correct. For example, in the default cmd.exe and on
180+
a system with the OEM codepage 437, outputs in codepages 1251, 1252, 1253
181+
and some others can be shown correctly when using UTF-8. On the same system,
182+
chars in codepage like 20932 probably won't be shown correctly. This refers
183+
to the particular system rules for codepage, font compatibility and the
184+
particular console program used. PHP automatically sets the console codepage
185+
according to the encoding rules from php.ini. Using alternative consoles
186+
instead of cmd.exe directly might bring better experience in some cases.
187+
188+
As a result of UTF-8 support in the streams, PHP scripts are not limited
189+
to ASCII or ANSI filenames anymore. This is supported out of the box on
190+
CLI. For for other SAPI, the documentation for the corresponding server
191+
is useful.
192+
193+
Long paths support is transparent. Paths longer than 260 bytes get
194+
automatically prefixed with \\?\. The max path length is limited to
195+
2048 bytes. Be aware, that the path segment limit (basename length) still
196+
persists.
197+
198+
The recommended way to file paths, I/O and other related topics is by
199+
utilizing UTF-8.
200+
156201
. Support for ftok()
157202

158203
- FCGI

0 commit comments

Comments
 (0)