summaryrefslogtreecommitdiff
path: root/ext/iconv/tests/translit-failure.phpt
blob: bcf7f9a38b06d940886186dddcbba1f2dbb5fee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Translit failure
--SKIPIF--
<?php
include('skipif.inc');
( ICONV_IMPL != "libiconv" ) and die("skip"); 
?>
--FILE--
<?php
// Should be ok.
// Content from file is from libiconv testkit. Tested both
// with a string as an implode, no difference.
// if at some point internal encoding changes, set correct one
// in INI section or use file 'TranslitFail1.ISO-8859-1'.

set_time_limit(5);
/*
 * The bug (fixed in libiconv 1.8) was confirmed that iconv goes into a
 * infinite loop when ASCII//TRANSLIT is performed. We should stop it in
 * some time.
 */

$test = 'Écrit par %s.';
if (!iconv("ISO-8859-1", "ASCII//TRANSLIT", $test))
	echo 'wrong is right';
?>
--EXPECT--
wrong is right