1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add basic sapi_windows_cp_conv() test
This commit is contained in:
Christoph M. Becker
2020-05-04 11:50:50 +02:00

View File

@@ -0,0 +1,21 @@
--TEST--
sapi_windows_cp_conv basic functionality
--SKIPIF--
<?php
if (PHP_OS_FAMILY !== 'Windows') die('skip for Windows only');
if (!sapi_windows_cp_set(1252) || !sapi_windows_cp_set(65001)) die('skip codepage not available');
?>
--FILE--
<?php
var_dump(
bin2hex(sapi_windows_cp_conv(65001, 1252, 'äöü')),
bin2hex(sapi_windows_cp_conv('utf-8', 1252, 'äöü')),
bin2hex(sapi_windows_cp_conv(65001, 'windows-1252', 'äöü')),
bin2hex(sapi_windows_cp_conv('utf-8', 'windows-1252', 'äöü')),
);
?>
--EXPECT--
string(6) "e4f6fc"
string(6) "e4f6fc"
string(6) "e4f6fc"
string(6) "e4f6fc"