@@ -117,6 +117,9 @@ PHP 7.1 UPGRADE NOTES
117
117
========================================
118
118
6. New Functions
119
119
========================================
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.
120
123
121
124
========================================
122
125
7. New Classes and Interfaces
@@ -153,6 +156,48 @@ PHP 7.1 UPGRADE NOTES
153
156
========================================
154
157
155
158
- 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
+
156
201
. Support for ftok()
157
202
158
203
- FCGI
0 commit comments