Download src/php/php-src/ext/iconv/tests/iconv_basic_001.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 719 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/iconv/tests/iconv_basic_001.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/iconv/tests/iconv_basic_001.phpt
-
curl -L -o iconv_basic_001.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/iconv/tests/iconv_basic_001.phpt
719 Bytes
| --TEST-- | |
| Test the basics to function iconv. | |
| --CREDITS-- | |
| Rodrigo Prado de Jesus <royopa [at] gmail [dot] com> | |
| --EXTENSIONS-- | |
| iconv | |
| --SKIPIF-- | |
| if (substr(PHP_OS, 0, 3) == 'WIN' ) {die('skip not for windows');} | |
| if (setlocale(LC_ALL, 'invalid') === 'invalid') { die('skip setlocale() is broken /w musl'); } | |
| if (setlocale(LC_ALL, "en_US.utf8") === false) { die('skip en_US.utf8 locales not available'); } | |
| --FILE-- | |
| setlocale(LC_ALL, "en_US.utf8"); | |
| $in_charset = 'UTF-8'; | |
| $out_charset = 'ASCII//TRANSLIT'; | |
| $string_to_translate = 'Žluťoučký kůň\n'; | |
| $string_out = iconv($in_charset, $out_charset, $string_to_translate); | |
| var_dump($string_out); | |
| --EXPECTF-- | |
| string(1%d) "Zlutouck%Sy kun\n" | |