Re: Re: ICONV test

From: Date: Wed, 09 Oct 2002 14:19:56 +0000
Subject: Re: Re: ICONV test
References: 1 2 3 4 5  Groups: php.qa 
Request: Send a blank email to php-qa+get-6032@lists.php.net to get a copy of this message
At 15:12 9-10-2002, Derick Rethans wrote:
On Wed, 9 Oct 2002, Rui Hirokawa wrote: I got same result with you. I am using glibc 2.2.4 on Linux 7.0. transliteration is not correctly supported in iconv of glibc 2.2.x. If you are using glibc 2.2.x, iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") in translit.phpt causes a notice 'PHP Notice: iconv(): Detected illegal character in input string'. This code is to detect if iconv() supports transliteration, so the notice can be suppressed using @ operator. <?php include( 'skipif.inc' ); if( @iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") == '' ) die("skip\n"); ?> Ah, great. Only 4 failed test left :)
Nope. Still fails on FreeBSD/libiconv 1.8. Output is not empty. Made the little change below and output is as attached. Index: ext/iconv/tests/translit.inc =================================================================== RCS file: /repository/php4/ext/iconv/tests/translit.inc,v retrieving revision 1.1 diff -u -r1.1 translit.inc
--- ext/iconv/tests/translit.inc        11 Jul 2002 03:44:12 -0000      1.1
+++ ext/iconv/tests/translit.inc        9 Oct 2002 14:14:22 -0000
@@ -1,5 +1,6 @@ <?php /* charset=CP932, KOI8-R */ +print iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") . "\n\n"; $str = "\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d"; print iconv( "CP932", "EUC-JP//TRANSLIT", $str ); $str = "(\x9c\xe4\x9c)"; Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua

Attachment: [application/octet-stream] translit.out.gz
« previous php.qa (#6032) next »