1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/intl/tests/uconverter_func_basic.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

19 lines
564 B
PHP

--TEST--
Basic UConverter::transcode() usage
--EXTENSIONS--
intl
--FILE--
<?php
var_dump(UConverter::transcode("This is an ascii string", 'utf-8', 'latin1'));
// urlencode so that non-ascii shows up parsable in phpt file
var_dump(urlencode(UConverter::transcode("Espa\xF1ol", 'utf-8', 'latin1')));
var_dump(urlencode(UConverter::transcode("Stra\xDFa", 'utf-8', 'latin1')));
var_dump(bin2hex(UConverter::transcode("\xE4", 'utf-8', 'koi8-r')));
?>
--EXPECT--
string(23) "This is an ascii string"
string(12) "Espa%C3%B1ol"
string(11) "Stra%C3%9Fa"
string(4) "d094"