Convert Binary to File Using PHP - php

I'm using a service that gives you a wav file. this service gives me base64 binary code as a result. I want to convert it to a wav file.
I've been googling for it and couldn't find anything. here is my code :
$wsdl=' < url > ';//url to WSDL
$client = new SoapClient($wsdl);
$param=array(
'userName'=>' < my username> ',
'password'=>' < my password > ',
'messageId'=>1063716
); // parameters needed to download the file
try{
$res=$client->DownloadMessage($param) ;
$base64Binary = $res->DownloadMessageResult;
echo $base64Binary;
}catch(Exception $e){
echo '<pre>' ;
var_dump($e->getMessage());
echo '</pre>' ;
}
and the result of the echo is this:
RIFF&WAVEfmt #€>dataÞ%¯ÿ#HrÿvÿÿâÿÂÿ7Æÿ‚ÿžÿ€ÿÎÿÌÿQQÝV…‚© K 6(Iv7%ýÿñÿÃÿªÿÐÿ¦ÿÜÿWÿKÿ®ÿ¯ÿÝÿ”ÿ•ÿwÿ¹ÿ¶\JŸœñ{KH66þÿõÿõÿäÿªÿDÚÿ÷ÿªÿìÿÒÿNóÿØÿÈÿÝÿÄÿÞÿžÿ'Úÿ¾ÿÒÿYÿqÿ…ÿÌÿ×ÿÃÿµÿ¸ÿÉÿÏÿñÿŸ‰¿uÚÿ$x;^UÁÿ¾ÿÅÿ|ÿ­ÿ¤ÿøÿüÿÿ™ÿèÿªÿmÿ…ÿAÿ™ÿŒÿ0ÿÿˆÿB•ùÿ·ÿ†™ðjÖ=1µê}*|!<ÿ‘ÿNÿ|ÿ¦ÿÿÿ¼þ,ÿ(ÿÖÿÿyÿÇÿÕÿÒÿîÿy 0TOHƒ-Q$’‰kO>\¾µÇÿ¥ÿØÿÿ(¸ÿÁÿŸÿ÷ÿêÿœÿõÿsÿ¤Ùÿ#ôÿƒÿ[Ÿâÿ›ÿÝÿ;§ÿ,ÕÿMK¾ÿ<�EÎÿŒÿ©ÿfÿ²ÿ²ÿ¢ÿ¿ÿªÿóÿ0aãÂ~T¬íq]/.D*áÿÿ•ÿ`ÿoÿsÿˆÿ<�.ßÿaÞ[‘•kùÿ ÿhÿ:ÿóþ0ÿWÿšÿêÿ1|N©ÿÊÿßÿýÿ¿ÿ¸ÿSÿÝÿúÿ)°ÿ‰ÿâÿwÿÙÿ^ÿ¼ÿ­ÿ®ÿÕÿhóÿ¶ÿôÿe)DãÿØœˆ=o]¨˜1+ J»+;çÿÍÿÔÿg¤ÿÚÿÿÓÿÿàÿÖÿÍÿ?ÖÿÖÿD oöÿ}ÿ—ÿaÿ¤ÿ¨ÿvÿ·ÿ1ÿ¼ÿ”ÿíÿˆÿ09#°ÿC¨ÿ: ?`%_îÿJ*[dBãÿQëÿïÿüÿïÿÐÿcÿ›ÿ¼ÿøÿÕÿÇÿäÿÜÿH«ÿ¹ÿèÿÉ$΀aCMy2r3^ž<�ØÿHçÿ-†ÿŽÿ#ÿ%ÿBÿ‹ÿºÿ¡ÿ"éÿ÷ÿ«ÿçÿçÿ/öÿ¡ÿôÿ¸ÿõÿéÿrvgj%?²ÿÒÿÿöÿËÿ®ÿ‡ÿ<ÿ¼ÿ­ÿD1ŠcY+ Iuÿÿ04SÌÿ:<ÿXÿûþyÿFÿ÷ÿŒÿiÿÙÿŒÿòÿ¥ÿ ÏÿðÿÑÿhO#Òý¼» ¶&1\ÿgÿžÿªÿœÿûÿ#þÿ3 µûy(E„ÿ/¥ÿŸÿŒÿ2ÿ!ÿúþ_ÿÈþ¾ÿ·ÿpÿŒÿ:ÿøÿÝÿæÿãÿ_–±œ2ë•òÚË•xøÿÛÿåÿªÿîÿÎÿÃÿIÿ\ÿj·ÿ·ÿcÿËÿ<�=6xQ„R„=…ÿdÿœÿMÿ ýÿ‚Mü±PþÿžÿmÿƒÿNÿéÿ ÿOŒÿmÿVÿÿ$m›ûÿêÿ›ÿ2òþÕþvÿäÿþÿ{ÿûÿnÿ-Q\v[ÿÿ2ÿ!ÿ—þ´ÿDÿ8ÿ™ÿ*ÿäÿ)fJýŒ5hÈ3ÃJOVk/jÆ*<ˆv/\pÿÿçþ¨þ›þtþMþqþÀþIÿYÿBÿ¾ÿúÿB6t¥õßñÛ()¼ÿëk¢ÿj7“„ÿÿïÿýÿñÿ&ùÿÎÿcG¤ÿÈÿÀÿ²”ÿÞÿXÿ*ÿÿ,ÿ þ³þéþ¥¤wûÿq;æÿÿÀÿðÿEÇþ$ÿÿ­ÿ«ÆÿàÿŽÿwHUÿ1ÿvÿhÿ^ÿÿaþéþRÿÿµþÿ¡ÿÍÿrÿ„ÿaÿÀÿïÿ~ÿÃÿòÿ«TÓrb¿û‰ý¿Û}Iä|«}v¾o1Ñÿç;õÿûý<þzþ¾ýêüüü¿þ–\ÛÈé¤Z’%½ÿßý^ýÆýþdÿIž‚q_舶Á¾£þŸý°þdýêüÿ&¼:=o2ý;ÿ"þžþÖÈ^ÿü„û˜ýþbüWùø.úðû{üú…û¿šþö¹öòörùøØñô„üV¹¬ý&üôÙ¨û÷zü B¹ÿþŸÿœ¶}ÿóõàþŠþQô³â ºù7þ»ó0ý ýðä¡ÜåËôcÇ©è üÚõêÌî?öøò9òø‰°ö¶qÍÅmtî%¸|EùøÿFax¶/CÞÁ~ˆ(&&D(üKñ+÷OGëÔÖãlö‹úÁÿFö îåübî\ÞÐæNû³:T~4 ‰›þ%ä …ª¹ðÐîE_ÐûfúÑûýÞþ…ÿéÿÿLþIý ülüwüœý8þCz2…wÝý:O6'%êõÀè¿ñcû áSØÒï(¯]¢õ)ý÷|íáÚéIÿïb = Ëøºî9ð;úã s‘›!ï†`&üvÿÌTGÔáÿriþÀü2ü2ýÊý`üü-ÿV Mÿ¬ürüàü]ý(üÿû°üÿ–¬ÿÿLÿ÷ÿÿ'þÿÿwþ÷åþkG;Æ%Ýÿ®ìóã<ô`tæÁØðI"n ùìëõ õéeÜgàe÷´8MRüÍ{ÿ&ïsæ[ó~þmH¸¤2™ÿîûœþw†o†ÕÒ×6¦ á±þñýõüîüÿ²ÿÿÑÿêÿþþÂþþ¡ýýký¶ýÚþŒÿ)·ÿhÿ“þÖþëýÿNþÍ?ÿøìþòE9€$¦þîièô¾ü}áùØHóaÅ lÊûŒö˜Åõžã¿Û$á^õ‘ÓT[›'0qîcèô}ÿ‹ Ks1T]åYÎþ¿þL‡mΤ<ÿ´ªaÿÊü±þ€a#ÿËü$þ¼È×ýðú9üÁþ¡þý}ý˜ÿ§Lÿþ´ý¡ÿ zËþÜÿÇÿ®FŠvÿißfe)¼0cDûJðÝïúþÎîÖÃæåvŠˆîö1>éí’Þ3Ûjê« ÿ×þªöà Lù¸ì¬ñ YXÝ ýuì­ VØÿ'i+[Èê?‘ÿiþºÿž=€0M*ΣþŠüöûÈüÙüAý~ý‘þ)ÿšÿ‰þÙý(ý!ýý"ý¼ýþÉÿÉÿ/dÿδýµ ,P"|ö¹þ7ýãÝtï:ýÊ _ký÷ÿ" $Êñ_ç-æHðìøôÓò=ûõÆ[ücú×ÿåÐX[WdD MPsþÿ1{ñÔì#kf¦Sè#pÿ-ÿGµÿÃþÿmþœþþ¦ý0ýiý'ýý.ýâüŒýÃý&þ¯ýMþÄýºþQþ"ÿÕþÓÿÁÿ|½óŽ6!_ ?…amùØç‡ë%ñã÷×þ¦û´ú’‚Çÿ$úQò³ðó…ðOîÝñH÷0ý:ù#Ê ærúÕm Z6; tXÞóؽe㪎§ÁÈb¸ò‘âð¡s'¾|ÿdþ|ýý“ünüVüšü­ü#ýDýŒý–ý¦ýŽýbýPýñü"ýÂüeý ý?þ¼ý¡ÿ—þÚÂóÆ ·TRÁÿèùø‡õŽðRï»ï¨îäñSó"ôöø¯ø"û½ûûÎûgû1ûJûûúËúPýÙþ­çÊ* º BX!ó±Ç)#ƒÔ‚(fûµ%'öÀÿäþþ2ýœü/ü˜ûwû;û+û+ûNûWû†ûËûàûWüküý ýðýÏýùþ¹þÿpQÃì £¡Ž x]ÚÿÞûÿõãñ÷îÛê[ëSëçêÅìï=ñnõ¤ø¼úCýÿ ^Ò[uI£H}ÖY;÷ ØÇ —æ£5» bãFÂEŽ¼$ÿCþ8ýEüûâú_úBúúMúyúûQû.ügü:ýpý!þ#þÕþìþOÿ§ÿbžÁ\í Ñ~CË[7fúµõIò'íåëRëvé„êìÍíSñ‡õÕ÷ûüýXÿW°¨Ôùäë=é”ãÞ²Ägwï4,Ø· 3¬å-¬I G ÀÖ6<®ÿïý)ülúRùFø!÷ìöÓö®ö'÷[÷Ê÷2ø!ù)ù8úFúOûwûãüàü‰þÅþBÞ…rÂ~~ƒÇÙýGù¢õšìOè`ç×ã/çì¥ì+ñýõ‘ø>üVÿ2ý?üûõø"øBö õáörúþþ8ÓèQ…€îO¥Q×ó»:Íà$ ½_²ps èh³þý´üžüÛû%ü0üàûqûæúîøØ÷iöäô÷ó$ó®ò›ò&ôkôA÷øKûü´ÿŽÿ“" HÉKlç0”hú²ôåêðìºèÞîÚòÎóâ)ø¥³Éù•ùiô|éõæäUáÝèÔîô h r5`ˉ)ãû‹Üu¯d- šo4þj! Æþ ¥áýÅýñýþü¹üsü<ûUú#úø2÷ÅõÓôÍóËôØó5õ›õ7÷dø©úüJý}ÿNÿžn/ü^šº!øÙ K møMõ­æoßëíæõ…ü ÿ(ÿ• i]Zò4êé=äá‚åä+ëY÷úÓo-:g!obƶ bÚͪÚù‰uÄ.G—ó¹6ÛØ©ÄíT¡ÿtþ·ýåýüIûYùZøAø*ùIù¿ù¨ùµùSú]ûÜû5üüBüªý¹ýÙÿöþžKÿ€Mÿ…n% "=)ƒ8û÷8îÝéxåú×]ãÛïYlÇã6+úáõêýÜ°×±ÙaâØïXü°§€rAoÐõ¹ ‹a ¯7‰t‡¥ Ä rŽ®‡)qÔÿÍþeþ/2ÿÉþtýÐû2ûû%ü­ûaüûîûküþ-þÿþþþ‡þQÿcÿùþÒ+ÿÕòþÿÈ$u&¥(ç öû$ìœê‚å2êÃäTßòêª÷àÌ ÐþmóTì|ìŒæàWÝ^ãîDÿÙ…•š˜™Blä„ØŽ—%x\é’‚D20G³Ó“Â"‹ÐKŽr~»FR±,yÿçüýGû‘û”übü:ýæü†ýëü&þ£ý»ýtýýüý`ý{þ‹þNÿ¾Ïÿ +Mÿgà#Ò$À*2ïüòéRáSã"éŽîëéQïï÷ß|^#7þ ìßøà7åJèêëùñ¾ÿ‘—M,,Gybàæ[Ï?ö ÊAøÿ úÿ-0K›ôæN³»ú—ýÿ^ÿ%r|¸ÿ#ÿÆý'üeû7úJûªû£ý6ÿ’¢ÿïþ\þËýûýþðþIÿî×QSêÿáHþâ "4%»*ùýáÖ`ß³ê¼øbùú5úïîèú€älÕbÖ,äXöËI†F±êe¨þ6[ 3l î)ô¬+ËCýÿ÷ÿùÿøÿ*3OeÐþ‘˜eÖt°´È3Êÿý¤ýSÿ§þ¾ÿfýðü!üHüªýTýBýVü”úÌúüÜýÿ–ÿÓþÈý–þmÿPÞÌÿxƒ»=c ¸"“&Lîý+æOÜÂäüíú·ýþ-ü_þž®/ö-ëãåJíþ÷}ß3ýþ—UÒÆ › Ž]p}…Ñ’ZBÿÿõÿõÿõÿøÿûÿÿÿ/N–×lÃÖìwi>„%}ÿÿ‘ýÌü«üüüƒý0üoü³ú]úDúZúºûwüƒýìýsþaþÜþ”þ’ÿmÿ,$ø Ü­Nü¬²é9 QýÉîÝðäòøðùnúø¡öTøú¥ý)û”÷ƒñzí™íßðj÷Åü.þáýÔüùü}ÿÉ É 1lº”Ì Ô §”‰ƒÎ…I6 øÿöÿþÿ÷ÿþÿ÷ÿúÿ3S¢ê Œr‹r­uBqíÿ×ÿ*ÿšþ¼ýšý.ýý ý´üeüüäûÊûyüÙûýNýdþÿ’ÿ{!¿n ed–„ü}m YÙüª÷+ø›÷]úáøiù*ö¬öìöù<ûù®÷!óñ+ñó.÷ƒù$ûrû4üÖýúo©– Ž ¸ú Oê¹s’ ˜V%ýÿþÿøÿúÿöÿùÿõÿøÿöÿûÿûÿ'LËEâ©·›K›qþÛ:Ë÷×g¾ÿÅþ^þ/þØýƒý¡ü>ü¢û—ûžû#üŠüÖüý%ýuý¶ý;þµþ0ÿaÿÁÿ±ÿ3ùwÙuç^ ßÄ IH®îÿRýû¤÷cöÛõ¤õRöØöD÷Fö¡õÿô!õ öG÷YøÅøþùðúÏû±ý°ÿÓIÓÈ ž‘ £=JÇt#"þÿûÿúÿøÿ÷ÿöÿöÿôÿôÿöÿùÿ7k°7÷ÇÅÝ•¥›Ð‹Ü”oó3‘èT²ÿøþ}þ¸ý'ý üzügüLübügüœü«üýCý¦ýõýUþ„þ½þïþ5ÿkÿýÿ3à»dl«œ¾`Å3vþýû¿ùrøo÷’õ-ô¡ó˜ó3ôÛôfõÖõªö¯÷“ø²ùû²ü¦þ¯TªÚ¸ƒ¥—¿)ÂzN/ýÿüÿúÿùÿøÿ÷ÿöÿõÿ÷ÿýÿ#}ÍDâråDmqb/Þ~$Êc©T#úÿ°ÿ™ÿ¡ÿ“ÿ£ÿ¤ÿvÿfÿ^ÿCÿ?ÿ;ÿ%ÿÿÿõþýþÿ+ÿ9ÿcÿ|ÿÜÿøÖäÏ~U o·ö…·3áÿÿ«ýˆü©û®ú’ù×ørø4øJøUø…øÌø:ùÁùJúûÆû—ü¹ýíþâÿßÝ…ÝØvñsº~T6$ÿÿÿÿþÿþÿÿÿþÿýÿýÿüÿþÿ#:PaixŒ‡yreSKH>22* ýÿõÿíÿæÿÜÿÒÿÎÿÕÿÜÿ×ÿÙÿÞÿåÿêÿöÿ÷ÿøÿ6m#ÏûeÜ.„w íuõ¿o ÑŠ*ñÿÚÿ§ÿrÿ[ÿ/ÿ ÿÿãþ¤þ†þ€þwþ€þªþÕþÿNÿÿ·ÿ×ÿ6a€ï9ŸÕ³¯ÆT)¥¯ÿ„ÿQÿÿòþwþþþ(þQþ•þØþõþ¬þˆþšþNþþñýoý]ýõýrþÓþ!ÿ*ÿ"ÿ/ÿ4ÿBÿKÿ<ÿ!ÿÿÿúþÿþKÿ›ÿ«ÿ›ÿ¬ÿÙÿ×ÿÈÿêÿèÿÅÿÔÿÚÿ®ÿÿƒÿqÿ¥ÿh ¿ÐÕñߎNÙÿžÿÿaÿXÿ[ÿ?ÿ>ÿUÿPÿKÿFÿ:ÿMÿ–ÿÏÿÕÿüÿI…™™~aKH3ïÿ¦ÿ˜ÿ¨ÿšÿ‚ÿdÿOÿDÿIÿ=ÿ2ÿDÿ]ÿmÿyÿÿ{ÿ”ÿ½ÿÌÿÀÿ½ÿ¾ÿÐÿñÿûÿáÿ¾ÿ©ÿ¤ÿ©ÿ¢ÿ˜ÿžÿºÿÊÿËÿÑÿàÿúÿ#&%+I]f{–«¦”~zuaG5/-÷ÿíÿæÿÔÿ¾ÿ­ÿ›ÿÿŠÿ–ÿ¤ÿ°ÿ®ÿ«ÿ®ÿ²ÿÂÿÃÿÃÿÅÿµÿ¬ÿ¡ÿŒÿÿ›ÿ¡ÿ›ÿ’ÿÿžÿ°ÿ¶ÿÇÿÒÿÜÿêÿýÿüÿ!" ÷ÿ÷ÿýÿóÿëÿîÿèÿßÿÞÿÌÿÀÿÇÿÀÿ½ÿÊÿÕÿÕÿØÿÕÿÕÿÕÿØÿãÿãÿáÿÝÿæÿ÷ÿ (28<�AGJOPV\]WXVUTD846;1&"ôÿæÿïÿøÿÿÿÿÿõÿìÿçÿïÿ÷ÿñÿèÿäÿèÿèÿÝÿËÿÑÿÛÿÜÿçÿêÿöÿ'75486% *.$ìÿÔÿÁÿ»ÿ¸ÿ¸ÿÀÿÈÿ×ÿáÿðÿüÿýÿ þÿþÿúÿïÿèÿïÿðÿêÿíÿñÿðÿñÿóÿïÿùÿ-#D7.öÿíÿéÿåÿêÿíÿàÿåÿñÿúÿ #),-7AB:.($! þÿóÿéÿïÿîÿíÿõÿÿÿúÿõÿðÿéÿæÿäÿèÿëÿïÿéÿçÿãÿßÿïÿîÿèÿìÿñÿôÿõÿñÿòÿïÿíÿîÿìÿòÿÿÿûÿûÿ ÿÿòÿüÿ þÿüÿùÿüÿÿÿùÿöÿöÿòÿïÿæÿáÿÞÿÜÿàÿéÿïÿúÿ ÿÿ õÿõÿóÿñÿíÿíÿõÿøÿ ùÿöÿúÿ "&ýÿüÿþÿÿÿüÿúÿùÿ÷ÿòÿëÿóÿ÷ÿûÿøÿñÿîÿðÿóÿòÿåÿêÿñÿñÿùÿûÿÿÿÿÿùÿÿÿùÿúÿ ÿÿ÷ÿîÿìÿïÿôÿúÿñÿìÿñÿòÿéÿëÿóÿòÿçÿâÿèÿèÿñÿþÿ þÿüÿóÿìÿçÿðÿ÷ÿ øÿêÿßÿßÿåÿìÿòÿîÿùÿ$ üÿúÿ÷ÿõÿüÿûÿþÿýÿúÿüÿøÿùÿÿÿúÿýÿüÿõÿðÿêÿêÿíÿíÿëÿðÿóÿñÿñÿôÿôÿïÿîÿïÿøÿ ñÿïÿéÿñÿþÿ÷ÿþÿþÿûÿûÿúÿûÿüÿüÿóÿóÿæÿçÿïÿøÿüÿûÿ ÿÿüÿûÿøÿîÿñÿóÿôÿýÿúÿûÿÿÿûÿýÿ þÿñÿóÿùÿ÷ÿðÿèÿàÿãÿæÿæÿðÿøÿöÿ÷ÿ ÿÿûÿôÿéÿâÿÛÿØÿÜÿÞÿãÿíÿóÿøÿùÿøÿýÿÿÿûÿöÿüÿ ÿÿùÿ÷ÿüÿ!! üÿþÿ þÿúÿíÿéÿíÿìÿïÿðÿïÿòÿóÿ÷ÿúÿýÿ%'" ÿÿûÿùÿðÿîÿðÿêÿçÿèÿéÿïÿíÿòÿòÿòÿñÿëÿðÿîÿòÿúÿ ÿÿýÿûÿ÷ÿîÿîÿòÿüÿÿÿ ÿÿýÿûÿøÿõÿîÿèÿèÿâÿØÿ×ÿÚÿÝÿàÿæÿëÿîÿòÿõÿûÿÿÿ üÿõÿòÿéÿéÿêÿëÿëÿêÿëÿëÿâÿâÿâÿáÿêÿçÿèÿéÿîÿïÿ÷ÿÿÿ ûÿõÿúÿùÿøÿôÿõÿóÿôÿøÿøÿûÿúÿøÿøÿúÿýÿÿÿ ÿÿúÿøÿüÿúÿòÿõÿøÿüÿþÿ úÿþÿüÿüÿüÿõÿóÿðÿëÿãÿÞÿâÿàÿåÿæÿåÿéÿóÿüÿ ýÿùÿùÿïÿêÿêÿèÿçÿçÿçÿëÿïÿòÿôÿòÿòÿïÿïÿñÿöÿüÿýÿÿÿÿÿþÿ÷ÿóÿñÿòÿðÿïÿðÿîÿîÿðÿõÿñÿõÿúÿûÿúÿ÷ÿøÿõÿôÿóÿ÷ÿøÿ! ÿÿüÿüÿÿÿÿÿÿÿþÿüÿýÿþÿÿÿþÿþÿùÿóÿóÿóÿöÿöÿóÿëÿìÿìÿéÿîÿõÿ÷ÿöÿùÿ÷ÿ÷ÿûÿþÿýÿ þÿüÿúÿøÿ÷ÿöÿôÿôÿñÿòÿóÿùÿøÿøÿüÿöÿûÿ ÿÿúÿõÿöÿ÷ÿùÿöÿøÿôÿìÿäÿçÿæÿèÿïÿêÿíÿñÿ÷ÿúÿÿÿÿÿ÷ÿøÿúÿýÿ""'%! üÿöÿôÿôÿöÿôÿûÿûÿýÿ
is this a base 64 binary? if it is, how to convert it to a wav file?

The string you're echoing looks like a plain wav stream. Just write it to a file without any decoding and you'll end up with a wav file. Be sure to use binary mode when writing the file.
$ptr = fopen("file.wav", 'wb');
fwrite($ptr, $e->getMessage());
fclose($ptr);
Wav header info: https://en.wikipedia.org/wiki/WAV#RIFF_WAVE

If the base64 encoded data already represents an MP3 file, it should be as easy as decoding the base64 data and storing it in a file:
file_put_contents('audio.mp3', base64_decode($base64Binary));

Related

Base64_decode to PDF

I am working with an XML file that provides a base64 encoded PDF document. When I take the encoded string and enter it into the base64 to PDF converter located here it works fine and decodes to a valid PDF. However when I use PHP base64_decode($validStr) I get garbage back to the screen. Here is my code.
<?php
header("Content-type: application/pdf");
$imageParam=array(
'pCompanyID'=>1,
'pSysUser'=>'dburchfield',
'pDocID'=>588690
);
$wsdl="http://192.168.0.31/WSSmartConnect/cCustomerDocument.asmx?wsdl";
$client = new SoapClient($wsdl, array('trace' => 1));
$soapCall = $client->GetDocumentImage($imageParam);
$response = ($client->__getLastResponse());
$str = implode('', preg_split('/\s*/', $response));
$bin = base64_decode($str);
echo $bin;
?>
Here is the result when it renders on the web site:
�ioz�"�}tzw(v)������{ޖ�^�ig���m���r�j�f������������h���Y��ȡ���0�z+����_�0���隊{-jw�ig���i��0� ���M\��r�j���g��.���"f�y����{���m����u�2��&�g��.���"f�y��[IT�LK���x�����Hؚ����\H��][����Y�\�����Y�S[�H�\�S�ۙH�՚Y]�\��Y�\�[��\��њ]�[����YH��Y�S^[�]��[��TY�H�ӛۑ�[�ܙY[�Y�S[�H�\�S�ۙH�������[�ؚ��Hؚ����[�� M�њ[\��ћ]QX��HH������X[B�'/U�[�̈́���(��Pԩ �LVX��d��Bd�6 +,��{R-��c�XMi������Y�iڳN� �����*�����������=���)� �$�-WyxڜI�0[�Ȱ_�b"���U�p�d�e��,5�YT�����s8듨J4�{�/]m��V�,'�MW�{C)�SM��(�]��Țxq� �JU ׄ�e�c�Y�m� �;�R��4�^�u�pd1yy�0]����4�o��Y>/MK>�TX�;2�ZU�Mv�-r�mGW7~��\�7ۣ:˪W;��nV╌�7�*L��qG �랇��8,�¢h��#�?}b>)#�МXK�؂Q�+����?��9��/�� .�ɐ>�~�f&�;z����#�ɭ|9r�pN����"���M�s�0��{��6�`�S�r]�>ߔ���&4�^s�`{b���w�#"��#5d�;�<.���lA���{��P���b��k�N�5�d�/G�;i���&#(�ӡ$�Z��\�h�"�f�Jƣ��+�n� �W: �^?����Ě���=�ؑ�2d3Ë��I�>�rC��_Cр5�#P��;�5�Q�L#�*O�A�I8v��2c�`]� ���"*F�+�둝L��W�gr�����s�A�7���7枎��o�)����<����Js�[�t��Da�Z�;�^���������+�-�W61���Y��m����6 �[���X[H�[�ؚ��Mؚ����[�� NM��њ[\��ћ]QX��HH������X[B�'U4b��=��M%�F�dEUh-a�4�J�ݮ�8�"L�"M#�2!:�%H�B��-'m�c ��"9#�$ƕH�л� u �L#��eZ��y� Z������}����\}6���c��$�}m���w#Q��FQo�>� ��R�G#�F�`[�����>����L��/1w���VeZ�~��J�a}�w|l�?���p������=&�o>O<���c���W��z�n�a� �#o������АЭ᷄ő�[�?�=(�ׄo�LM^eu3������g�t �h� iK���E�W����`���{#�T�zq� �[ʙm��J71f&ay�׉��b#,���[*��PJ�#���2���*��;�}.AQXF���M�_�0�5�t.܆C�89��]6c�{��D؃����C���m7��$-�LҨu .�� -�(�zm� �*����B5 Bl J����qzM.|X?z� t#֖2�k � ɴ�c:����&�>��#�+����aM�om�o���u$7�w){����"P�xZ�"k��C��m��b�� �XWXR�C�>�.���r���̺���Aj���i&G+ M�aM�#�E�'[ �?6T>Ɲ �9��}�q�#��J���ឧ��FfV"��\P>j�5#p�!S�v�m���_�� Y�Ѕ�R��w��oo����Cd�Y��Y��扴~ٚ4��] �C[����Ћ��w����'��*}��m�'��ݰ�oA����0]�1��C? �o�w�;�c��O�v?��3%{'���ʪ��ǡ=ΉG��djQ��^/�����A3����L&5}���aDaeai�����7Y�/�K3=�z� s9�oK�e�T}� A��C�xp�_ ����+v#��/q���ŤǼ���ט��#������~K��p��{����Ҹ����aDZ���q=�灓� ~���qך:���՞?�_�Rk�#������{+~\~I~V��alD��A� j�jL�&�z �3n�P�����������������r���o��Po���]�E� \������y ��{ ��m�A�y��K������ʼ�r�Bm��rݬ���d#$V��'�4���������h~W�5�_�����PT�>�Am,C^;\�%��]z�!В�Ї�9� �>u���A�6 �V���-����V�3����G�~_?Ǐ�����K�a����,��C���f$��C~g�f�U��S�&�s=|o�w�Ϙ�Zي�\�%{̑��ݢ�"� vl��'�Q��(&�{�ps�SH<�~L�p�ȏ���F�Ƿ����� �a�/�&E��g�)�)3�-�I�EFV�|�dZy��{�����R(-"�%� ��[[����R� Ȏ�Z�K^#7z�ъ2{�� fd�Q�3_��'�C͘��#��X��P�H��9_8�L�¥/���}{>�����1Z��_8�m&0/��ja�^g�;� �Enި�gQې�l� '����j�Y��� �L��c#�[� �=U�SԾ�4�ZW�Į�Ћ��֏#�|�/m�8$����6�_�'����:}�&�pQ($.�Q�!�zY�(&���h?ݸ �#�A�Ӆ��~����Px�O�Fc��_��5t��f�2��5���L8���P#H$y�p��&�gNTZ �<�l����'dp7u�W�w�E�����'"lj��=�1_��Y��۰�`���M�> ��{-{!{9H&߁+�GZm��� .A��>�K:3FpŠc*h2u��ƁYD�;�`��"����E�7��H� �*t��o�z0��}R�k���^�m�>��l�|d��t���.��g���5� �i�hbh)��jB^xo�au�[Ty;����:/�3��Aޗ�y�A�o�O�?T����^?z��r9X����1����]UYQN�S1�|��#ߧ��ݎG]��X��^#����MZ�T�e�C0JK/4��]�М92 3A��X�����0����z�*�S��P�~Y�"�q��<�hi�0��::ߚZ4%��ɓ�}!�pM���JOU��䴎�>�\ ��xT���zǟ�p�pΡ�ݚ�+pu�z��U�*`U-�n 탱���!�{�*`ѝN����v���B�|,\���'�*4���ɮ�z�8;�4�c��T*�&��Z�О�[�F�3���Z;~�!ٝ�\����f6�s���18oP��e�lgr���u�j�厦mp�"� .ݻZ����T�徊[���/I/�\=^�1y�8y6��w~�)c߂j���Bè�3��7j�$80�y�p�5�����}�8����s-ݴ�(/���-�F���P���%�}6S��I�������4�Ė�p1/?��IUi�LY���)�B����=�|PR選f��f����aڼ����$Qwj���W�t���XK���#����3+�����Mzi'�(/�Gc��إ+L)�1�T���%����4Z�;k-��/����S�,�t�Z����َ��&#��dӖ��+�&e�:��o�L�%/��3wR����c0ō�����+���8&"t龡�{K={fi�b�}YiU-�]J��)EL��D9c?���v�a�S˄}w'�U Xl� ��l�6����T�'7�Qiۊ�l��_���~t��r� �`c&M{V�ZYp�#�WN�:ﭜ�ku{(#��AƢ,�l3��sE}��݃�����D ��D����i�+����G69u�涀�Z��-�HJ&��Tp���R&�tC��t��=g~�!�ik!$<�܆NGè�NT�qE�t��4y�6�v��g,��kW��a����A���?k�N�z�� �Vĥ_ �+�Pm�4y�3��A�h�;J��kh�Q��Oj���a%�vxEB:�.,�d���[�2��A� ���P~�l��>�l��I��<�,���!U���C�_vx��#�0�&�Aɨe�Vb�ҼQ��ʱF�O`�>��y~��#�[����>*�T���R�:p�6AF��n#֝A�:��5Gt*��X�:�����|�%��c凕R�4h��$L�s.h^m������Φr|:D�1��`�D��eT�R�oU��t�JgKiJS��z�Y3���Op����A�������$��s O�� �1�G��s O¼��G�^F��!��=U� �� Ss�?0�4�: "�BF�0ĩ���+�)&�B���S�p�� Dp�xF�!���6�&�� ��|)��*ɞ���0���ED��0\Ĝ���^�V �t3o(.�Qɢiv��u�Oc����2��ӂ2�+���//�A=Z7M!� �۠��Bhd��] oG���w�F�{ ��EaJ���Wn?>x �YO&��6�5�\`�W:�������,̬�l�l���(��uRN�Ml� |��h�#��A��G�.`��%(]34fh^ݡ���n���)��#f�Fϐ��r�vh�k����5�F��q�fn+����KA�/��^���� p`7^�êG���W�L�ݾ���3�n1��O��:*����F�$^�E�w�H�(�?�E�� �����a8�QaЕ ��(�TAW�RrJ�YfT�� �R�d�D�T���}�N%H �Q��R�J�NP�JB� �A#Q�Q��\�)�� �������k�K�ðw ����_�N.�Ϗ���X~�'F7��[��b4�T��uΪU�C�g.���-�t^黙�k����lVO��}L~��v���G�w�go���u�a=�z�K%Z�3�"�50'S�����,3`�-��>�a��-#z�4(��E�K(�YuEvk�9����"����v(�|-�J|W��i��L����[�b��t P��|�B/�QJ�YK�ȜY��Ju٥����iW_�h���pjq��ˡ ��#�#O���H㢀G���-Z1B��,��O�Q�����f���FY:5��RҚn��h6��׀�.� �K�Fp3�iVR�Ҳ�__��"�˯| �|ˆ ����PWbU�-h�z�V�9�G�� �`c�{�������<��+�L�+ww�U�,��L���)%��,e�b�h./F6ex��b��Ӎ#{[F��v�%��Qk*m�a������=���4���r�#�1Ǥ������7�:�of?tu��}a�*������m��Σ����f���,�����������}X+ |Ɉ�����h�jǺ�W�tQ�^�[��Xb���(���7�!��UhYZ�ZcS2���iT���S��XM�-�[q�v[���J���'� �Z ����p��yq�9ܮ�f&!g����T �(��ů���E�3cݮg=]aBӤ��ڡ]��l��j��}[���U��b:{#]%�����LD�bb��FM|��8��{=��� ���0fnV�� ����lg�q��!�WƖh�xC��hZ���"Zܶ.X͐��5��v}�/2�]p$�GK�!bѤ!��G$�1���j~:��mV�l�Yo�����5�� �f>�q���i������x�E~ ���!`�*+��|������pT��Բs�]�y��-����B�� C�K��C��\���'�Ň��0��U����Q���uZ-=����)��xL.�7C���g���g���9j;^����9a�9k��m��ϹO�EC��f�E���?���������Oyv`��3���ʫɺ�F�*��� �KL�go�kZ����_-iti�$n �a~l [F�#��܏_#�q�NZ6��۵��r��-�G�ö�ݹE8���J���l�C��]�L8�<�2�6�}�~�w6o���5ƺ�m�~�w�dj�S�T�uQ�lЛ��՚u:�),!�eHk���r!ʴ �?�͡E}�c������-�F2��ǰ����`{$��}!��l�蝆l�+�;K�.W8n�oZ�V�lŦ�gmTh �o����g�V%��5g�� ?�ƪҬdq����;����e�~�?(��3�O�Ym�if4&��iv%��z�1�n ���X✋����br �Y84��p#f�0����ܳB�E�9�MW�&1D���"��� ��?�M�?����e��0e�}�S����c�u�9�8}z,t�4�"�љ�V�s��mK�L�m�,�m���-Eh�h������˳:�kk��>�cfqV��B޽�<&�;����x^p�*���ptz=%w��m��m �/�%����P=��{azgst����y���Rǘ��M)���;�1X�����\��/�جn�%����m��}�� D��j� J�2:Ye���gU�(O$���F��3�Yl�nJۦ�k�"n-��p�������Qt��.i���������:�I�m1or\Gp�۟�?��GY��f��G�#�>5�ǯ��ȶ�|��D t\tq��)�����N��s�\]c#���7!c�� (� M�۽����e�=��mt��Z����<�_JȨdr F���2�S��\��-����"pf<#�m��Wu!�8 HTiA�4Y�`ʚZ�Ju��뾞�I�g�B�60�����#D=8���y�E�RY?�}���#ft���o����w�;����K�^n7�g3�`��YJ�<{z=��oX�5�9G'*��s��Ӹ ��bBr{ؾ�"�D�S�tW�z ����Gu�CN�Y�*�_ �\��D�3c U#!$���W3��Rn�P�K9����]��P�TH�r.��r�:�w�4��Nw#i��b1P�gC��<$)V�B��J����� �T�eOfD�XI�^ ��0h�I�oJ��;���ǝ쓆7oEQ _�ǣ!P��:�U� ���27�)hXT�޶8��# ] d�i�%;PBx�z�R6��wV�b�� �;�+�����?��z[�u� �?sz�;����p�y��_�~�Q�K�ӈ�~�{KD��j�[v�"}�����E=8���� ft���gJh(J�a��*ZD��Wy`�V;����F) VE�r���h�����|��0�U�ԅQMh�,#�L^Z�#�Q���_�v���7HI�O=�' �>,D�xЎ;P�f?%�]f�$4�e�Z�j�t�|��bT��"|bc�4�1�8a8Rq���]H��W��=Q�- ���s�.� �Xi����g eqd�!�^קb����yV[�3�5[v��/ş{O�G�����_���� �w�娅��\"\�ś�n�+�m����c�n�Ե���M�;�L7�~#�J>%�f�y���t<}�� �*���Ub��4�&e�����3�w. �?���d2?j�6[��{�طÇ�z�o��|���/�.��r�.�)J��?{H?p�?]�f�U���h ?� >���a��$3{�*���Qo$��\�����5Y��R��a2��y�#���y�+�� ��#V�#֜hB42��p:+��D����eB�#�~}/U�͸w�oz��G;F7�=)���� ���w��'��Fp�ۻ�7�\���etW�~�֑������#�?J�>Ք�w��(�ϦEmx�x��}D�Ge��1>�v��y�ٵw�v���1��.f�:��,����B��9��,u�����0��p�*�[�\�H9��k��������������y3����#B�(��E� ��V�F�H�*�*� e�+���r�I��0MP�������)��u���["��%�mL����nQF�,� ����2Y#�UP�,ȼ�| �������L۾��0�0���v1�xӶT��#�X���]��Zha,���SRڃGA��(.��N���Ntf�(���'���4&��v梈*��4�Do�1��!��C-�Lw2T��[����^ӟ����䧔�~�%�l��R��V>5��ym�XJ�g[ʏ�������}v���w����5��e'�a�ŝyk�o����z�?c���x�~z�M?�y[�T����JooO;�$����?�'�mx���7��:_p����������ҥT� ��Am��"-"�$�7��,#/ 2g�%��J�)�O�F�r ��)u6�z#.D���VU(�A�נ01��������QOI�DIsM�"o�`��`~�։�έ+����꿰�4��R���c����kNۍ�R�_J=1T�C�s��;ؐ8�.#��/tI�ѳ❑3����s���gͩOx5V�o�ђPib|�K����zOaDi���"*����XXÿ��f�c���E~�mJ���f��G?���FY�n����t�Z���=f�D�ܧ�oQ�[O���1d���ݍL��IT�Y�v�'��;R��"���Q�����YV�X�͂��{qo��J����5�����?�lA��ލ���uU��/!c%� ���o_����\'w��Cs�_���g3P�� �;6��koCzџ�&��z�ǯ�;AHe����Sֽ����T/'�>�?�an�H_������+3;�^H7`�#�7xݮÐ�������Ȋ�����G�'�����K)�Ɔ[�+~��~3��l�:���ξ�8��~д��ӻ����-Y 6s�p.�����x���_Go�܋����|3����1Q�� L���;�!��C��7Q�C�S�=;F���D�\�Z�� %tE�i2���)<� X����i�����k�?U%�����j3y�B�����)��2�3_(�q�����;b����Y}�� ^\g���;���`>��:TD�2ƒ\`�[�V���K���{= r�ЮDX����5V�U�r�S3�P������d�b�*=��v�B6�"� -3 �v�?8�2)G��(б[< ��� .T�<^*���"�"&���C���T�V]$�&(�&��p�ۤ�S���Z!a7��$��� �E?#��v3 b��δ̧9+����Tܙ�l�AN��C<�e|ۇ�]r�S�u&*ԧ�gT��������+oy>�y7U���]~h#?����f��6;���ڃ���}��n�9y�a?a�+�����&��/�`�j�M�5�+���5�5��ލ�����5���&��*>����%[�n<�{}�$4>�~UҒ��>��񋖜yu��o}����u� �LB�3Nap�9L�N.X'����^E�l��1 b�Q��g�o���/�_��ti���F��s�\�[�˚��L�U��Y��sqʢ�����L�`w`ֆ�U)t�U[��<��:�0kD�h#v��|����7��T�DOC����wxTJ��Ε�J�F�L�o\�JK��[�#�� ?�=%c��!oy?�nU�_���R���������^�C�u���|����$�b��;�'q����^D���好a�>��]�dL$��<�+�Fi oE�3�Gj���k+~S-�����dԼ��K�����ѓTԐ(�֚֚��c[�B���k�)ޜ�e.�CLƹ�Ջ�:k�8���]S�;+{�zk���)�'ʀ�v��0�����f�4T�k)��[\[QSQ�̹vV�XU�y:� jZʵ��[b[#�ҷWV�oz/�:�S�ߪ>-����Ɨm]Cc[]Ad��>`�T���k>�7�_C��cS6��UN�L�Uv2�}��3�T����0������T:�U+|�wਜ�9&������W�RN5(����Q��#�E��z�T��i�{��e(��̀jӳAm���(��-G� E5����kA��T����Kyy�E1N�ŧ�f��.�T�>�� �W 4�gP�?c���A�8$B�T��\���a���y�}mlf�c�5��[5����L�� �U��W���̾+w�����u�$6S ��E#���9G��ɟ��N�6k���;�<"�9�Q���_)gZ2��>K�<���m��r\�P��'�#qa7��g�փ�4�p&�pe|S1�b�c"�V7[ËŦ���H)(b��P{����`<5M�j��q�#Yad�$��,a������%�z�*�om�{F7K���]�N�hzz[J:%u�zB�>��b`J��^�O熀�?���$[Y���R�&W �w�έK�K%�0V4��X�� ��3~wi�#>p�<ԟ�!�<�aGW�2�?�|���Ej��_�ѻ���^�����p��"��kR#e� �x��;�e��#xĶxP�$��v ���J���{��j��dž1�qN}f���I�$�>��u�$q����a\�� ����)�5՝�y.����w��h7GT�^-Ih�c�tX3��O9PkRP�G>��r��+�KU��6�2\B}�_��U��Y��,F�(ųۥR�]y<=��]�1W �8%G�&��N�� dEl�+�R�~]gݲ_^����(#���]�#"��T`zq��$��C|M�� �?M�F`��V�I�|�#?K��1������}D`6g�uCI��H���_I�W E/y�K~�c/���}%���%��'0n�7���)��?���_��ן�"�B����❦ЛyJ��~s���r��7��j�pf;Iµ���J��H`����� �{���`��X�I�����At���{�bI�$j ��fms*9�\�c,֣9�Q�V%r�+K |d7}� �%�/oI�5H�^R��D��MO7���&�u���)/zhb-�-���|�!gK���� ��X�V�gE�gM�u.�T�h>����yYn� F���M��2�p���w���4�4�O� �Ǻ��q66� U!P�!-9/���EYn3�#5����n��_}���)��#�R��%��kCqFR�N�<>VH���OH������D~� G� �C]��+�%�,W��IF�5�QQ (�Ӂk�T���<����K�o��"8��2C�4����A���e�ǝ��:ן|��S�-����^~i��h8��_�����m�v�t�~~a��y~�����u�����-�� 9]߻�{�N���r]L ��K� �7�V�#�wXT�UeLM!��Q�����<����ٍ�۪o����O�ߺ����w��~�|A��[h=�LTm� n�W%��o70)f��:����6 T{��~�� M��o!������ �sc2�p���Rnr%c�{uL�g�ɜr�\�2;�#8V��\���PʾriWC����*Ʉ�k�,TY��J�61<�� �^^��/v��!$�,塑K�_J �t���e�d��R��N4�MϏZ����m��6�>�Tۓ�pM�t���&�,���ϧ�p|go�,YXͧP�C�;}&f暓 ����>x dۀj�N&O�U���U��N�2��/7�Y�ڍl ��s�7����x�7Գ�!"����ɐ��+���������%O����-�����d}�"�σ�2i�y=�����=^�s�{Mh�N�CW�� q�I�V�[�Ffs��k-Z��&4*^��\��_��,6ꬖχ��L���ىy���n��]VJ���Q)�K�0�7�)�&w�U������|�ʋYos���)���ߟ5�lZ�����?�w�q x�I���w�/��V�j�j�#5�CgEX��S�W8�"���I�1��0(�jS|��V+�Xl��de-T��������B z[ <��L���!��e�%N�/IJ��+Ҭ�'�$M�>:R�T�1�����˺�h��;��}�ܦ4�u#�֓��jYǁ��U���:�m���7,}���c� A����{:��п�����*K�R��`໋1n��Jh�=\nR/�Œ���}1����G>K��;��pA�Y���?�wX4��3�%g�K�v}�Uq��gߺ��κ����pK�俳���:;��#���#�YF�{�7�/z����W?#�x��M���7_n�F�K��(Bkm2h#8�L+�[�vD�e�r� ���HJQj��w`N4��[�f:���c�IB�P���]��2�k��w]�����q���m�&"U��Z�VKLHX� �r�&�7��Z�0�����,lv���#���3Gy�ٱ�>WAJ�������]Uж�L��/D����'B(WX�F�:eS��H��sJۍ�m���.��6�w5{�زa�%O_�ZgLb*�Ò��L7���z] �۬]YQ���]\�9M��L���]�2�5f�Q^4�� �#�� �¡�\�Uj5x�x�!�=�Ҍ`��q+��.2.r�+xѴ�c��v�=��{�O���6�s�жbR�ƶ�C��ۜ�鵩�����=]9f�G�J���|�:)�x\0�9�Q��5�ڨ�*u���6w���z��n��������"z+m����� C�_�Y�z�N;s������N��a�R�����p���R�V�A�a�k7���2�a8����ۍ ������q��! +iŋ��6J{��.��ȑxN��#��;!D��R�v��6�҆�ST=#<�X�D`vw���%���l*eᢣ()=� ���s51׿sP���^?~jٻ�*N*�3�D���(��zPu��0n"���3�m���,�^���|�� ��5�؝�_P�o��8��_u��G]3������6� }�%p�2�9��s�Q�����9/��s�s�o��m*ޟ]}gtW���7U�w�ѥ��IR���J�$ ך|�U��p%^M���z��E�2�Q#�n7;pϭf���V�zum��B�:�2�ʮ nvY���o��� ���+r�������(͎�.X�H���N���4�T�݀B��(�(��2�o��J}XIeM"���L�Ry§�]7E��Y���"���)zu5Y�& �q���Imi�3%S����-�1�2D�ڽ1Dr�����8�����p����<�}��i6��R��Fi�נ�V�\�Cx�QϽ*�nsS*���P��?�7����Oy���_�:;+�*�ю�����˝K���W;�3]f��f��ߵ������t����ޥ0{mʖ/�h�y-xYb���� ������A�k���X��ǎ[\)#_1≑7�4�1ؤ�±���W��$s���!���3�� "̍u0iD d�g�0<�`��یe�M�������=s�5T�۷�!���}����]�/��v>w�'���zǟY´��A��D ����A8�5մչôñé؁�a�bbY;}h�Lڛ�h�����J��L���J�:�Y) #7�5�ou�ŗGӬVm�C�I���_vО>� i/K��_�sr&�Mo��MwL&���<�0�呒:�O9�� �&槒S��S��f����-��3a4^#tNwm2m�Q�4�� �m�F4��j�xgd�f�LO�����k�:�tG��1Q�v�D���L���Լ�"d�z�j�it��Hgi�b�|$��d��-�̲0,4qI�곶-���z��*� �Y*�G��jo7�����#�7��N�����]�����-G6/����z�x��?��Ee�6/P��ϥh�+%8ێ��%+Υd�������jv��`�4��c������]Y��K��{e������1�h6�p����� G�ҮΗk�/J�ƻ��\�];\]�Wg�FIΗS�5�b����g�T:S����A6u/�s8^I��)0���ݾ��7������"=xP���KM� �Z�J��}~��Ζ-�g����&�����u��������#�#w�_7�vPê�����ԏ��ע��dҔĩ�c��2E���S;K�fB��M�2������}�p��d`'�>.j ��ܝ��e������bыg4383���� a��f�����h�YkΘ�~!)0�T�_m#��d�7b�)t��,҃���r�R�DaC#��KX��P�E�IfǬ2�x'�(��i�-I׾%����m��E"�E�U���3�S� �S6�6A�sE��gm�45��p�5�fw���S��1�o������w�8���9�q�;���;u�˷��Y5j����.gk*������nx���0�6Z��Y{{cg˷���l���巜��E�<={`�6#|�P����k �������Z�w�e ��Zs3;y�P��c��y ����MlUR�E�����f�{Uzca�^BGٕM����:�I�{>�+��r�|���`��0J�U�����Ȗ�g������.�*aOF���3��\��A44�����# bNNw��'���2���M�����ȉP�lR*̭fLӲ��5|v��q�����]t���fQy�Ž-�O�S�^K��byg�ɤ��Z�n��>3�t3�c,J&�Q��g1k,�d�ϋTabV�"QQ���_:��)c�s�k�{��u�C�C�O�j�S����Y�f,��H��F�V�]���ǭu����]N[�lm�ze�u��C�'��ַ�f��u/�ĥ]�����_d4Y��7��D��S[�r{#�+ ��B�E8��СЫ�(SyhT)7;K�֮UiU�UQ+Ϊ�>��#\$�)d���z�� ������ݭ��AƬ�z�˿��نg�q����Y ��I-6SM��X0�#�B�J�B�9���B5�.R=6�,�,2�8����:9 ���$� D<$]� �-��k�,u�X���ښ�*��!��(�*lB请��o���u������%ଘqBtZ�v�����GFoyR�]SwSQPܹ4��s�/3� b��Z��6 �8�F�k�6D��p� 778�bX����� ��Y�Nڹޮ�-�ĺ����M���/��N�ѽսҶ�IM�k3��D�Ö�<ӎ�<\��?�� F��-��%01� ����oR�?q�� ��4�r�lջ{[hLy�/~��t^��~�ϯy��Oȫ���*i�<��S����p�����w �Ӂ�=2u�/����4���b�G�O�� c��A��U��:f~eEՌ���z2�c�eJ� ĥ� �;�OU>b�)��w�xsy%��K� ��a���W:�f�-}����������z��"s�j��s5h��/�7���[µB�����t�^� �S�)T��� 1�=(��C rM�a��v!A9>�h#D�XR��e�`[`U���� ������x�8{=h�����z�>�]�P��;n�� 4���'�7�m`~����=X �m�����Ŧ����&�^�[�ڟ%i��N6�eA�}�x%�X�w�0�Q� ���[��9'[����F�&�ݱ�����?��Cצ��j<����V�� uF0�F�ҍY,��fօ�B~��e�%�L�n0���#�i� AlYZ]]����C������� ��ע����8�+�V�J���ˎzs�AUo�yO��T}D.��{��j {[+��a?�qs9�����.��}�3��?�2�-���=ڶ��d���}v<Em����pK����z"w:ͳ������.H��۞�SAK~���|f�Ń�xN���מ�d��_��c�ű>�o��I3Yn|GҎ�+��^ۺ�_hq�~�J��B��5a�-jDښ;�����k�mjj��2�TJ�DK�q� ��׍��'SP�V�'g�l��#y��Y̆RC=�� �U[��"(ޥQ[ׯ}# �䔳R�}��h�Ӈh�+Y�;��͑e���p�]v�z��x�8$�Z����B9as��R�4��$��͔ �"�#�����A��]6��c�ϡW�pi��ݫ�a�Z�?�Wpl�A�����Aɵ��0VU�J{��M�P�. ��靰���m��l�R��^���k�z��7�{E�}�� �z+�QXj���앆�j�AjT,�QG)G��C�An�H&�� ��5Z�*�5bR0�5�=t�������݈�N� w[P;�`���Y��2 7 M�j_*��R����А�M��U�e�i�+�U��/�g[��-o�h����4�~�j{�� ��&���.�AY��� G�Z�)ū0 ���H��Zr�!��3�&N���������\�+��b�F�%TP%�B��;�R^n��� #*S����?׀2�iAD#�ېam��Ftk��7�2�T���.;`��ֆ�3L����ٴ��[������o�7{��֗�I�֯������}�v���Z0�z[ ,�k�뿎=��ͻ����1�{��SO��PG������}jMG#ԓU�P�Do�-Q�Q�B�]Kߔ-E�qs�9��h��m��Uh�����c)�ܮ�8�r�����< gc�쬽�"X�_U�{{n��ZQ�<߻� �����i���E��Z�+��C�2���zip��36R!�*���h�\��-�pزǣq���va�j=ۜ1wSV~���I�I��NL�U�X�z`&Oh[��������/�C](6�Ɛ���m�+u�D����W^��Fw�Ri��G���t�l����OX��A���]����G�wi^6SP�T&�!��t��( XB0S�e)P�̔� &D���_�tޤ������L't_nΧKV���o����SH������{���?�^���\�S��},}!�I��5�*�W�D�ql];ktt�}�d�r����X��>v�u�����S#�$;�hAݚ+�v{S��dύ�ȳ�"*�#'�Q��tl�-�x�1�,��M���rFo�{��E�(O�])�ԗ&Z���*�7�ݢ�EeK�9CȈ�(��"���l5:Ŀ��"��/�(t �z$6�uU��U��� >j����^,�&z&�!��XM�c1�� 'N��ˤ �bZ�n��00�w)zTvN�e� �]��4����1qH!�¬���钱��,��[�8���R#��=���D���B� �H�A-�Q��N�-ft[�����K���dXpF�� M(��]�1�S����r &����!�g�oo����P�?#ܕg*������[�� ??u3�]�� P�[l�D_-�K��OG�P]�� X�K�o]�L0�� _!I�{cDk���|��B�t�E�W����6�g�ǰ��Ub;k<,P ���f��ʒĢ�htI�;�cL����"��C 5�CF3�I��{���($�]_�.\$�X�9��s�d�W$�n�~��İ�3�� �#\��)J�֠�CkCx0�#�5�����)(�##�0jdR��*R���#1Z9�:�ն�找�]��[��NY$А��Ï�΍����5lਪ�C���_2�q7��ށ�����ի6!�;>�of�u �ൔ�&�����Q`�qb�?�v�n���,�_�ҝ*M�f���6���o�������2>�M~�Z��b�g��?c��I�J���x�▅�~֤��-�Ï�w��it^y a��1�óJpWL��������0���#��<>A�M�`Rv� �OS� kQx�O# �ȅX�^䊕0x�� ��BE���;V�T١��:���x�B���N0M%fr�4�k�g�V�jv ���j��Y����!Y�S�3�'���rz���$��P�t/n�����E��+L. B�����W˩9[�Q�UԞ�� MP e<$�z �W%K�Z����#�\�(G}1l ~9�1ĝ�l�w�m�G8�����G�O[�f����V9���-�*ձ�6�|2����dh 5 T�����h��L<�)dq��͝֌��SZ�}$����P��ڎ�p �k:�>�fg��^���>� +n���_0-ӓ�P���G��R��~8����v�"���V��l��0��L�"�0��m���Y�b���7]��G�Z%(���p��w�b������B���3�AXV���G��_���¹�eΈu�c�nn�]'o�R�+)���m=D3?X�1e�����v�afuf������N5e��3� "_q������|�SE��9��Ǝߘ5�yyZ�؂;s9�Aǯ>4~�}�ٷ�B�����v���퇽�Y�{�F�6R�q*�~�?Qޥ�Q/�o����A�'�4��o��Y4�I�T�f��r�Ҏ��^eh+r0�ҧ(���u����.�a��s0��O�)������K����n���}��?c���4p�:-�CE�)M��R�S�6���)��N�1��8����ڂ���G�T�}��=P`��U�z���ò=*N0h�"��r\����& �[��O�bS�6��{�qiʃ� �AqrXn�ٱ>���1��kt ��m1��UE�R�e���|�"���["��Q1��CT6v���j #Dz���Cn>��ց&�!�q�XX�%ab�gf[�#^���H��n�U��It�Iw�6F�H�����{�.O�n~reRy�>�c����ѶrbL]�=��I��7|��)&�LeMF*�P�H_�f���K+� �Mo��l5Y׃CIj�k��p�N��c#ZBj�o�/ƚ�����19��]�l��H�����2��/E��f���Zi����3��)��.�(�tC���l{l�K���N���n�_a�Y�k�B���A.y�קh���*��U��Q=��+y��+&hY����F��F!��kɇ�R�������K��~�#�0��V�H�K=O�6{#O��U�v�0��k����6j��fym���ꗴ�r��õWV��U��֘���,��`���/�u�z����)ն!O�B1�l� ��]��8g~�Cyim�.�G}z�(7�a7�P󡣷�:�J�,�y�lW�F$���sK�j'0>�*h,R����I6v�U�|�~rΧD��9�H�u�� �D��J�=$�o�7ːk��~�`qD�,�_3�H"����f ��*5tq�ދ���>g�0j��_� �^<�y��r��LJ��X]LK���fB,yFб]����Њ�얓kRu�k7����̲�װ����u�tX�a�=��>�i7��vj��v: g#pV��1V��>��ի�"�ig���}ɝ�}��{��a���æӸ�o�}�������_~��1t�5Y[���X[H�[�ؚ���ؚ����\H�Y�\����Y���H����[�H��YYXP������ܛ��� �����[�ؚ���ؚ��� �L� �L�H�[�ؚ��ؚ��� �L� �L�H�[�ؚ���ؚ��������] ���ћ۝���L�������ؚ�X���[Y�H��������[�ؚ���ؚ������^�[XY�P��[XY�P��[XY�RHH�[�ؚ��ؚ����\H�Y�H��\�[����ԙ\��\��\� �����۝[��� H�H����[�ؚ��Hؚ����\H�ؚ�X����X�\H�[XY�H�Ә[YH�[Y���[�� �M�H�њ[\��ћ]QX��HH���YM���ZY�L M��К]�\���\ۙ[�����ܔ�X�HL�������X[B�';wtZ��<��$ag%�$�7 �`P���q;���#�az�^����=���d�!7vÆ�81�H�7bGI�-*��M�L��MߔF��UIrR^���:R5om뒸�����y햀0=�����m�ϖ6��z#���>��q&?��x|�N�յ��������u-�wM��4D��_��]��o{׮�gW���v�8�t��/�N���mHW�����NG����������^��K���������s`�Fx!�<����R���B����t���:8$h���������L����(NL�����U*����K�/Tf�WŐ��ja ߤ�"hLN�-�}ãc'g���Ԕ���}٬⥑�[���(� ��o8�gɾ��'S�TǕ^ˑ�7�#���n~E���oQv�pV����}�����}��5�?�.EnY��q6`L����s��ji��-E����HM���ΰT��R�[𽶲���&�h�}��_���ɞ�Y��7>����UGw�����r��L�o� ��fC�mm�4g^�ᜎ3-�����3i����m[��{�}E ��m�v�)]�Ihܘ�æ*��?D1���ʆ��ͯ���?ިT�io����޸p_]*o���w~ԁ#;1��+�f��[���u�h��a��s�"�Pw���#e��kY��.6;���>��Va��?{�t:&��j���F�u�şqc��N��oI[{��r�4D7���,�hoh�ctآ3���K��{�6�򿺙�Y��������0���������r�Z��������) F�Ò5�%��m���E�'\wϣ=�&R������/�3�����~��݄��-~�3�ԟN!;�?�kwXh��:F�}���4vu��:Y ��]O1 ���T��{0�]��e7�<Л�0�V��m��Pq\�?�նGd+��?�{�Je�G���_��m��2�Y��W��Z�99�4피�Ɗ���ۆ������``�� :�QKC��ى����-w��h���F��ΛmU;�#����������`.�L��\/�gV���=��? ���}3��*����_�f �:y��)�ד����&[��,�#�J��{ ���w��Ы:����#�F���;���f��Z.xmM����3��Y͎%؆2����L�#^Iy���'�t�_�ql7����������=��ܹT�K�CD�խ��Bj8�_?�N�M'�y��h��k'�'��ꤘ���Ő��������K�q�'����L;;�����e6���z��� ���=��lN��Ow�m���!��x�|0������3.�eN�|�ejNE��{�9't���������������V��M�S!o\�v��RW���v[e���-7�)���%pje�o��L�1����GU������ ����^�����;�x��î-�D�Y�M��֣�&{�,��<]�o&n�#��հ�g�>>�����iֶw��]IgknfF=�|��a1l6�C�k�?rA���錡�P��t�u& ��*&cjR&s?U^ч!��6���wN~�ЎB�[L�t���c�>�S���[��#�#��S�� ����l���:fM�7�L؉��[�����'�g�����bJ��������ܣ'ze��Cr]��s�x���ћ1�Eܤ�ʹnZ�iu=��u �8�G�=�_��d�BXXXS���ϵ�������_O�$�����^����^��fE�/V��4s�m��8[�EN;Y�7��w��h[����=F����?���#?�4����ua&,��T�N$��;Hr�b�|��ԛ%�{�۞d������ܢ#`wl6� �����[��?C������'d�_<�ֲ����<��s�d>�;Ỳ�eU�#F&��p��!s�֎��WS�Le������tS�{�9#g�]�}=��ЖC=U�l����o[n_�t`����f�}^Z��b��2��2�vUϙ`=l�]W{�նɮ��!q�\��2�y�֦��}������M��+�7��^�\��ݤ�{��˝!�Ԯ�������Y#�����y�U V^EƛL�Uz�$���Ԟ3e�x],�p��N������t��3U�z����:�I���]����X,�H��g��ӧCyiN��&���#���j�c���V���G3���r��{���nY��d�ב񳹶v9td�.��{�ڋ�G��\�yw9�!�>�ӱ��yw]#���X���9}�ܩu�t:U�Mr9�O*.����F���o� �S�CG�q_?��s��S���l܂�����47�D�#���S��G�i�($d*�жj嗏���#��,���|}ٰ����E�sj����Op�u�w ��zi"% ��|�N�J��Tk�suz�}�׷���1����>�ɱ�ၮ��Y�ʕ�27���]i�{�ޙ��3g��%�Y��=�ޜ���)�[Ò���;�{�GƦ�'�X�;�pN�˱;��j�.l�[�-:�}���c���������_-1�ͷ�;RY��ň��pu���Tg����epֲ=��]�'cU���~��d�T��-bz�щ�����Qcp��}���Ų���!}��;����J�˝��}�Yzo����ɐ�9��)�_���(4W�/nN�nz���A���O.\�ϚwC>G��\�u��K�}�G�۟�bq������w_��y���]��כ�$���wRKٜ��/�|�����c��wA��6�˟��xA݈��iƨ[%xnj��g��֫s��%���=��������ڙ���h������s���L��6�˱���L�DL����< �T��pH������QV�R7nݿ{�����x6���./��<����☭�h5�y�6�Q4�����Ѫ�כ�%X��?�O��y�4Lό���pg7����_��_ �\y>:n|�^YBo�ݹ���J澹��?�0:L�r��T��ٺ�{�n�{�3#͈M�������K�N����6�]��*�f��s��0<^VWg���0,�w��� ���ɖ\�7�/]��[Y��pwv���k��#<^�,f[7�o6�������(�����ov�ۛ�le]��;G�7�_է��v�_˱!j���܂��'���q���w65�V�����}������C�{��\�����vVT:[�)���q���%���Os#�1d��#��Dў⧸�$H�_yX�A⨩�����C��N�w�/�����g5�7O����2;�#�M����e���X�9�4d����M���ݏ�#��f�o�'�%S��v��.D�������z���\�l6T'�J���F��L_��Z'��4�=?-����Ѻ�~�;��Lt�5���r-֣����y���o��! �F�H�o�y��m�/�ooϥE�sc�b�}�����/�ɏ���,�U��M��=����˼�?�*�����BT����̆�������*((�?ؗ�8�u�_?6^?��a_5�^Is��.�[��W�]�'�� ��ɗí]������.�k��w�����R�q�!�oJ���$��$T)b�ggmا3���\I1r���J�ê�sy_<<\L��X��0\Mkɍ���9��{�����Nf;g{qN�{���#U�����כ7c8�jXE���:�W7�o7>`��p'���go��3"�S����r�u��qgf8�K���Ջ�e÷��؃�"��rG�j|�j�a���Cb+'W�����ee���n����W��X���Cl��og;��e#�5��`�1R�>�����1z��.'��]����W���1��/���Ćb���� RZ�2c����P��i�E���Ʃ����^n�k\�/q���L��� t�D��0�us����&Yj�(�i��//l�i�e�ykO/z�L�K�T�l6�VM�G>Q� �>[�����Z�^ U�/��r�N �#�����#?���Ir���ܤڏ�r�^9 q����NJ� ��jh}�&W֞^c�o�/~�to��7���8�cq��߁�6u(���o/NMu�\IK�Mt�,ر��մӗ��m&������o��H��Z��9i�m)�+�o�W���T�� ���W�wG���=��#�^ "ì~�^�' ݽd������������cU�G����������_˷���z�^E�i�O �ͻ��ח��f��b���w����gWۡ/�)�GU��Kw��q�ԆK�\�H�܋U�X��N O�\������{��r�O ��e~|�Y�yifT�9����3S��Dž����~����_�a�%�/dv�-n.v��%?X�����;���O��Z��j�]�G0+��]�J��+�������f��0�{8��;�>Ic�����~2��0���F��ש4����������`~q��{ll���qV;�ޙ��gF!�Q��Z��S�\���8�{�޾h��C�q ��/���S�i^����~b�^�]��뺿j���h��13J�� /ľ��j�ꢘ�{�{��C�����G��nf빰�:�t3�k����x�OK��guԠ���e�����4Q�=R��S�f�I��5�j�M�#�^�=Rδ�4O"ko�1_�d��ۊ�9��گ��o���Z^p��y�N��!q�E3��x����\n��Q��8�Q����h�Y�ۭ:'�Eت9�d���#=Ep�Tz��ds�d��%5s�V�Y�˗�3~`g�>��u$Q�3^��h~Q����ۃ�*hhxxtvo+�ڧO�N�G�����6�����ɰ�yNJ��f�����gҝ^R���#�_#��8�sV�y�Ο�,1]&%w�.|���l,Ÿ��t�����Q�Ɔ��lG��?fSw�>5?7P۸z�]���eU�M�=Z�����˻�#���l�[H�n����ثw&'�3�瞜j����1��s>U�U�����sp��XM�N���b�ǭ؞q=�����C�!��X��k;,n����q�`�5��8}�E���z����]�~^5Ֆ}s�U�L67ЯL�i�c�,yɿ�;m��\�g7^Iw������5��������rf�j����m��W~�N{��M[V�M��Ͳ�ul�-��������v�W���!�߯��X�����j��W�����=�z��iֻ)߯�<�mՕ��V��q��8�����#KC�嶟ϗ ��Ow,��ܿ��O�q����VJ�m|t�������'N}�w�93,oq�%~��~�d�^� ��C����=4�����m����{�iU��墟`\;95��ے��_(�R�i<��}��x`jt}i-]:����R����������������K���� ap��ee��f#�l>B�����8ka��2D|�5�Q�X�ǯ_,�|�,X���>�����:ÿ���Ӌ�_��������q(��܄'Jt����k������t����퓯��l}8la����o�=��ϊ�T%-S�T��j���{%iig˯W-'�+ǽ���I��|�e�R��u>�<�>,={����f�堸Y:S������n�}�|Pj���/?9#�iC������#~P�I�aiiS�Ŏ���yTB�U3��G�O6~�=j^JY��崫��eu��܋'Z/e��&�\)fsכ_fS��|]�?1��fX��zs2a�G���D��Ϟ���eyԯ�zV�C����0��ݔ�|� �ǧ2kd�Be��yQ�ךo>��iX��zviC׾��z9O����]+�����ǟfr������g֓ϋN����)=uh�����'�&������t>���}�_}Y{� �߽:2U�u�ǩ����k�o��+��+#0~���BV��[���X[B�[�ؚ��Lؚ����[�^Y�]�X�T�Ј�MHLH�H�[�ؚ��LHؚ����[�� �H�њ[\��ћ]QX��HH������X[B�')a����G!���I�}q��u"� ��� 2 ���6k�Y�=���,2�J,������y'T��<�'�sWsݳ�����]˲��������`,^DX#�𛁎�O�6EȾč/���\���x !2~V�8/���\�0u�%����J�O�a.�3�CW9rS�%�'���I��Y�� *�6/i�/mp�B��ZH��.g|;�����ڧ�y�$������|'Pg�ÿ=Z-���i�B �� E���J��`����uu���~��B�pY�-�<B-f9��!V�_$�7����G�$q�.��Q�7�byپ�I.�#|C�b��|Az�����=.��/�sS��=�e-V؋Y��� �F�q������4�� ikb���6:�+�Fvγ��m+E{&���_��'T�E�vQ�m�BW#��E���m��v���gh��B���֜jb��T� F���.C��(��!ǟ����V!ğ葮�:�w�t�~�_�ɷ�y �|Q��%��vklN���O�{u�[Ү��_�%�$L�T&g޲����oE��[���M� �S�k��&�Y}�Ygɞ�H)��"��S ��Һ��A�I`�q� g9lJO� �sy�6T>g����[k99�����f��[���X[H�[�ؚ��L�ؚ����\Hћ۝���X�\H��YU\H�И\�Q�۝�PPPPPJ���\�Y\��]��њ\���\�̈��\��\�LM����Y�L���ћ۝\�ܚ\܈MH����[�X��HM�����[�ؚ��L�ؚ�������������������������������������������������������������������������������������������������������������������������������������������������H�[�ؚ��MHؚ����\Hћ۝\�ܚ\܈��\��[������\ZY� L��\��[�L��ћY�� �ћ۝���M���ћ۝�[YH�PPPPPJ���\�Y\��]���][X�[��H���[U����[R��]���Y ��ћ۝�[L�M����XY[����X^�Y � ��Z\��[���Y ���ZY�����[�ؚ��M�ؚ���LL��M� ���L�HH�[�ؚ��Nؚ����\�Y�Hܞ\�[ H�[�ؚ��NHؚ��ܞ\�[�\ܝ�H�[�ؚ���ؚ������X�\� ��\�Y�Hܞ\�[ H��ܙX]܈ ܞ\�[�\ܝ�H����[�ؚ���Y���H� �ML�H��M����� �����MH����M�H��NM���̌H����� �����͍H���� M����L������L�͈��̌ ���̌����LL���̍��H��̎L ���NL��̎MH��̎NH���������Z[\�����^�H�H�ԛ��H���[����������\��Y����LM�IQSш��:�g������^��m�g��.���"f�y����{�(j�hw/졪D�����

Laravel: Unable to JSON encode payload. Error code: 5

I'm working on Laravel (v5.7) app that converts uploaded CSV (with contacts) into array that is then passed as argument when job class is being dispatched.
Here is the example of CSV file (format that is supported):
123456,Richard,Smith
654321,John,Doe
Uploaded (CSV) file is handled like this:
$file_path = $request->file_name->store('contacts');
$file = storage_path('app/' . $file_path);
$contactsIterator = $this->getContacts($file);
$contacts = iterator_to_array($contactsIterator); // Array of contacts from uploaded CSV file
protected function getContacts($file)
{
$f = fopen($file, 'r');
while ($line = fgets($f))
{
$row = explode(",", $line);
yield [
'phone' => !empty($row[0]) ? trim($row[0]) : '',
'firstname' => !empty($row[1]) ? trim($row[1]) : '',
'lastname' => !empty($row[2]) ? trim($row[2]) : '',
];
}
}
Finally, $contacts array is passed to a job that is dispatched:
ImportContacts::dispatch($contacts);
This job class looks like this:
public function __construct($contacts)
{
Log::info('ImportContacts#__construct START');
$this->contacts = $contacts;
Log::info('ImportContacts#__construct END');
}
public function handle()
{
Log::info('ImportContacts#handle');
}
... and everything worked fine (no errors) until I've tried with this CSV:
123456,Richardÿ,Smith
654321,John,Doe
Please notice ÿ. So, when I try with this CSV - I get this error exception:
/code_smsto/vendor/laravel/framework/src/Illuminate/Queue/Queue.php | 91 | Unable to JSON encode payload. Error code: 5
... and my log file looks like this:
error local 2019-11-11 17:17:18 /code_smsto/vendor/laravel/framework/src/Illuminate/Queue/Queue.php | 91 | Unable to JSON encode payload. Error code: 5
info local 2019-11-11 17:17:18 ImportContacts#__construct END
info local 2019-11-11 17:17:18 ImportContacts#__construct START
As you can see - handle method was never executed. If I remove ÿ - no errors and handle is executed.
I've tried to solve this, but without success:
Apply utf8_encode:
protected function getContacts($file, $listId)
{
$f = fopen($file, 'r');
while ($line = fgets($f))
{
$row = explode(",", $line);
yield [
'phone' => !empty($row[0]) ? utf8_encode($row[0]) : '',
'firstname' => !empty($row[1]) ? utf8_encode($row[1]) : '',
'lastname' => !empty($row[2]) ? utf8_encode($row[2]) : '',
];
}
}
... and it works (no errors, no matter if there's that ÿ), but then Greek and Cyrillic letters are turned into question marks. For example, this: Εθνικής will become ???????.
I also tried with mb_convert_encoding($row[1], 'utf-8') - and it doesn't turn Greek or Cyrillic letter into question marks, but this ÿ character will become ?.
Move "handling" (converting to array) of uploaded CSV file into #handle method of a Job class worked, but then I was not able to store the data from that array into DB (MongoDB). Please see the update below.
DEBUGGING:
This is what I get from dd($contacts);:
So, it has that "b" where ÿ is. And, after some "googling" I found that this "b" means "binary string", that is, a non unicode string, on which functions operate at the byte level (What does the b in front of string literals do?).
What I understand is this: When dispatching Job class, Laravel tries to "JSON encode" it (passed arguments/data) but it fails because there are binary data (non-unicode strings).
Anyway, I was not able to find a solution (to be able to handle such CSV file with ÿ).
I am using:
Laravel 5.7
PHP 7.1.31-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2019 10:22:48) ( NTS )
Redis powered queues
UPDATE
When I move "handling" (converting to array) of uploaded CSV file into #handle method of a Job class - I don't get this error (Unable to JSON encode payload. Error code: 5), but when I try to store that problematic binary data with ÿ (b"Richardÿ") into MongoDB - it fails. The weird thing is that I don't get any error-exception message in log file, so I put all in try-catch like this:
try {
// Insert data into MongoDB
} catch (Exception $e) {
Log::info($e->getFile());
Log::info($e->getLine());
Log::info($e->getMessage());
}
... and this is the result:
Anyway, I believe that it failed because of b"Richardÿ", and I guess that the solution is in encoding string, but as I've mentioned - I was not able to find a solution that works:
utf8_encode works (no errors, no matter if there's that ÿ), but then Greek and Cyrillic letters are turned into question marks. For example, this: Εθνικής will become ???????
mb_convert_encoding($row[1], 'utf-8') - it doesn't turn Greek or Cyrillic letter into question marks, but this ÿ character will become ?.
iconv('windows-1252', 'UTF-8', $row[1]) - works (no errors, no matter if there's that ÿ), but when there are Greek or Cyrillic letters - it fails (I get this error exception: iconv(): Detected an illegal character in input string)
You have several ways to deal with it but I'd recommend the following two. In both cases, the idea is that you store a UTF-8 string.
A simpler approach, figure out what encoding it is out of the (your) predefined list and convert it to UTF8.
$encoding = mb_detect_encoding($content, 'UTF-8, ISO-8859-1, WINDOWS-1252, WINDOWS-1251', true);
if ($encoding != 'UTF-8') {
$string = iconv($encoding, 'UTF-8//IGNORE', $row[1]);
}
The second approach is to use a third party library outlined in this answer

PHP/Python json_decode doesn´t display special characters like €

I got a json which is generated in a python program and looks like this:
{"0": {"ausschreiber": "Beispiel; Zeitarbeit GmbH", "beschreibung": "\r\nF\u00fcr unseren Kunden suchen wir motivierte studentische Aushilfen auf flexibler Stundenbasis (450\u0080-Basis)", "datum": "17.11.2016", "name": "Studentische Hilfskr\u00e4fte gesucht", "email": "info#hindi.de"}}
now i am decoding the json in my php program to get an associative array and display this on the website.
The Problem is that the special characters like the € char are not displayed but special chars like ö ä ü are displayed.
Here is the php program:
<?php
header('Content-Type: text/html; charset=utf-8');
function compare($old_data, $new_data){
$old_result = json_decode($old_data, true);
$new_result = json_decode($new_data, true);
echo $new_result[0]['beschreibung'];
}
function go4it(){
$db_data=json_content(); //creates the json from the Database
$crawler_data = file_get_contents('http://localhost/phppath/python_program.cgi'); //calls the cgi which returns the json
compare($db_data, $crawler_data);
}
go4it();
What i tried:
set the header to utf-8
$new_result = json_decode(utf8_encode($new data), true);
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("input_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "UTF-8");
Thanks for your help!
EDIT 1
so it seems like the issue is located in the python program, thanks to #FranzGleichmann . I think the problem is with the encoding of the page where i get the content from. The page says it is ISO-8859-1 so i tried this:
url = 'https://www.example.com'
source_code = requests.get(url)
plain_text = source_code.text
plain_text.decode('iso-8859-1', 'ignore').encode('utf8', 'ignore')
print(plain_text.encoding)
but then i get the error: "UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 8496: ordinal not in range(128)"
it was a problem with the python script

Does python json output values have maximum length for json_decode (php) to handle?

I am trying to write a php code that takes coefficients from a html form, sends them to a python algorithm that returns a json object. That object is a list of player names, basically {"Ji" : "Firstname Lastname"} for i from 1 to 15.
The python code (interface.py) I have to create this json is :
import json
i=0
for joueur in best_team:
i+=1
output["J%s"%(i)]=joueur['nom']
out=json.dumps(output)
print(out)
best_team is a list of player dictionnaries with data on them. My player names don't involve any non ASCII characters or whatever.
My php code is the following :
$command = "python interface.py";
$command .= " $coeff1 $coeff2 $coeff3 $coeff4 $coeff5 $coeff6 $coeff7 $coeff8 $coeff9 $coeff10 2>&1";
$pid = popen( $command,"r");
while( !feof( $pid ) )
{
$data = fread($pid, 256);
$data= json_decode($data) ;
echo $data->J1;
flush();
ob_flush();
echo "<script>window.scrollTo(0,99999);</script>";
usleep(100000);
}
pclose($pid);
I call the coefficients from the html and then send back the results via a js file.
But I just get the following error : Notice: Trying to get property of non-object.
Nothing wrong with the js file because if I try instead :
$string = '{"foo": "bar", "cool": "attributlong"}';
$result = json_decode($string);
echo $result ->cool;
It works.
Also if I have instead in my python file :
out={"foo":"bar","word":"longerthaneightcharacters"}
out=json.dumps(out)
print(out)
It works as well (replacing J1 by word in php code of course).
And funny enough, if i have in python:
output={}
i=0
for joueur in best_team:
i+=1
output["J%s"%(i)]="short"
output["J%s"%(i)]=str(output["J%s"%(i)])
out=json.dumps(output)
print(out)
It works, and if I replace "short" by "longerthaneightcharacters" it doesn't work anymore.
So basically my question is, why is there a maximum number of characters in my output loop and how can I bypass it ? Thanks, I am very confused.

How do I prevent that the "<<" breaks the String

I tryed to build a FDF-File in php but i have problems with "<<". It's a bit strange the "<<" everything was before the string is deleted. I know the character is an operator but how can I use it to construct a string now?
here is my code:
$fdf = '%FDF-1.2
1 0 obj<</FDF<< /Fields[';
$fields = "";
foreach($dataContainer as $data)
{
if(array_key_exists($data['fieldname'], $this->fieldSet))
{
$field = '('.$data['fieldname'].')';
$value = '('.$data['content'].')';
$fields.='<</T'.$field.'/V'.$value.'>>';
echo $fields." ".$data['fieldname']."<br />";
}
}
$fdf.= $fields;
$fdf.= '] >> >>
endobj
trailer
<</Root 1 0 R>>
%%EOF';
and the output is:
<
<>
<><>
<><><>
<><><><>
Has anyone a solution for this?
Your PDF is fine, there is nothing wrong with << or anything else in the code. The only problem is that you probably dump the generated PDF content directly and, because nobody tells it otherwise, the browser tries to interpret it as HTML.
The solution is very simple: use function header() before outputting the PDF to tell the browser the correct type of the content you send:
header('Content-Type: application/pdf');
// ... Generate the PDF here
// ... and output it
echo($fdf);
That's all. Now, the browser knows the body of the response is not HTML and it won't try to display it, except if it knows how to read PDF (which the latest versions of Firefox and Chrome apparently do).
Depending on the browser and its settings, it will either display the PDF content rendered (as it would appear on the paper on printing) or it will open the default PDF viewer installed on the computer (Adobe Acrobat Reader, f.e.) or will ask where to save it or it will ask what of the above to do.
Adding htmlentities() around strings with <, > characters should fix your problem:
$fdf = '%FDF-1.2
1 0 obj<</FDF<< /Fields[';
$fields = "";
foreach($dataContainer as $data)
{
if(array_key_exists($data['fieldname'], $this->fieldSet))
{
$field = '('.$data['fieldname'].')';
$value = '('.$data['content'].')';
$fields.='<</T'.$field.'/V'.$value.'>>';
echo $fields." ".$data['fieldname']."<br />";
}
}
$fdf.= $fields;
$fdf.= '] >> >>
endobj
trailer
<</Root 1 0 R>>
%%EOF';
$fdf = htmlentities( $fdf ); // Adding it here would make sure every <, > is replaced

Categories