1--TEST--
2Basic UConverter::convert() usage
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7$c = new UConverter('utf-8', 'latin1');
8var_dump($c->convert("This is an ascii string"));
9// urlencode so that non-ascii shows up parsable in phpt file
10var_dump(urlencode($c->convert("Espa\xF1ol"))); // U+00F1 LATIN SMALL LETTER N WITH TILDE
11var_dump(urlencode($c->convert("Stra\xDFa")));  // U+00DF LATIN SMALL LETTER SHARP S
12var_dump(urlencode($c->convert("Stra\xC3\x9Fa", true))); // Reverse prior op
13
14$k = new UConverter('utf-8', 'koi8-r');
15var_dump(bin2hex($k->convert("\xE4"))); // U+0414 CYRILLIC CAPITAL LETTER DE
16?>
17--EXPECT--
18string(23) "This is an ascii string"
19string(12) "Espa%C3%B1ol"
20string(11) "Stra%C3%9Fa"
21string(8) "Stra%DFa"
22string(4) "d094"
23