Annotation of embedaddon/php/ext/iconv/tests/iconv002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: iconv() test 2 (UCS4BE to ASCII)
! 3: --SKIPIF--
! 4: <?php
! 5: include('skipif.inc');
! 6: if (@iconv("ascii","UCS-4LE", "abcd") == '') {
! 7: die("skip conversion to UCS-4LE not supported");
! 8: }
! 9: ?>
! 10: --INI--
! 11: error_reporting=2039
! 12: --FILE--
! 13: <?php
! 14: /* include('test.inc'); */
! 15: /*
! 16: Expected output:
! 17: abcd
! 18: abcd
! 19: */
! 20:
! 21: $s = unpack("V*", iconv("ascii","UCS-4LE", "abcd"));
! 22: foreach($s as $c) { print "&#$c;"; } print "\n";
! 23:
! 24: $s = pack("NNNN", 97, 98, 99, 100);
! 25: $q = iconv("UCS-4BE", "ascii", $s);
! 26: print $q; print "\n";
! 27: ?>
! 28: --EXPECT--
! 29: abcd
! 30: abcd
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>