recode segmentation fault
| From: | mehdi | Date: | Thu, 12 Feb 2004 16:07:28 +0000 |
| Subject: | recode segmentation fault | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177525@lists.php.net to get a copy of this message | ||
hi,
I am having problems with recode extension for php 4.3.4.
this is the configure options :
'./configure' '--prefix=/usr/local/linkbynet/php'
'--with-gd=/usr/local/linkbynet/gd2' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/local/linkbynet/freetype2'
'--with-jpeg-dir=/usr/local/linkbynet/jpeg6b/'
'--with-pdflib=/usr/local/linkbynet/pdflib'
'--with-png-dir=/usr/local/linkbynet/libpng'
'--with-dom=/usr/local/linkbynet/libxml2'
'--with-zlib=/usr/local/linkbynet/zlib'
'--with-mysql=/usr/local/linkbynet/mysql'
'--with-apxs=/usr/local/linkbynet/apache/bin/apxs' '--with-imap'
'--with-recode' '--enable-ftp' '--enable-bcmath'
this sample code gives me a segmentation fault :
<?
$text =
"062806310648062D002006270644063306480642002006270630062"
."70631062C0639062A002006460643064506440020064A062706380"
."628064A00200627064406270645062706310627062A00200645064
."6002006280646062A0020062706440631064A06270636";
$text = pack("H*", $text);
$text = recode("ucs2..utf-8", $text);
echo "'$text'\n";
?>
$text is a ucs2 text in hexadecimal. so I just decode it with pack() and
then convert it into utf-8.
if I remove 4 digits at the end of the hexa or add 4 digits (0623 for
example) at the end, it works.
what can I do about this?
thanks for your help.