1--TEST-- 2Basic UConverter::convert() w/ Subsitution 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 5--INI-- 6intl.use_exceptions=false 7--FILE-- 8<?php 9$c = new UConverter('ascii', 'utf-8'); 10 11foreach(array('?','','<unknown>') as $subst) { 12 if (!$c->setSubstChars($subst)) { 13 echo "**Disallowed\n"; 14 continue; 15 } 16 var_dump($c->convert("This is an ascii string")); 17 var_dump($c->convert("Snowman: (\xE2\x98\x83)")); 18} 19?> 20--EXPECT-- 21string(23) "This is an ascii string" 22string(12) "Snowman: (?)" 23**Disallowed 24**Disallowed 25