ZF-3247: unicode problem on slideshare, and there is no 'count' available
Description
below is sample from exception:
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 24: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE9 0x65 0x20 0x70 in /home/alifr/public_html/framework/php/ZendFramework/1.5.1/library/Zend/Service/SlideShare.php on line 547
Warning: simplexml_load_string() [function.simplexml-load-string]: Presentation de Stephane Cheikh, modifi�e par David Boisseleau in /home/alifr/public_html/framework/php/ZendFramework/1.5.1/library/Zend/Service/SlideShare.php on line 547
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /home/alifr/public_html/framework/php/ZendFramework/1.5.1/library/Zend/Service/SlideShare.php on line 547
Fatal error: Call to a member function getName() on a non-object in /home/alifr/public_html/framework/php/ZendFramework/1.5.1/library/Zend/Service/SlideShare.php on line 549
then, i try to fix it:
changed line: $sxe = simplexml_load_string( $response->getBody());
to : $sxe = simplexml_load_string( iconv('ISO-8859-1', 'UTF-8',$response->getBody()));
and problem disappear.
and I add one line, from:
$retval = array();
to:
$retval = array(); $retval['count'] = $sxe->count;
for now my problem fixed, but I hope in next release this bug will be officially fixed. thanks.
Comments
Posted by Michelangelo van Dam (dragonbe) on 2010-07-16T05:27:25.000+0000
no longer an issue (test added in r22571)