Handy Hint: AMFPHP to Flash Character Encoding

If you’ve ever used AMFPHP to connect your DB into Flash, you may stumble across weird characters being output! eg: – replaces the ’. The simple explanation is that the PHP is decoding it wrong.

Forget about preg_replace(), all you need to do is update your amfphp/gateway.php file to decode, encode in UTF-8.


$gateway->setCharsetHandler("utf8_decode", "UTF-8", "UTF-8");

and walla no more annoying characters sent from AMFPHP.

 |  Comment (RSS)  |  Trackback

Leave a Reply

*

*(will not be published)


9 − four =