« Back to blog

AS3 + AMFPHP + MySQL character set fix

To avoid charset issues when pulling from a MySQL database using AMFPHP:

1. Find the line in your gateway.php where the setCharsetHandler is set.

2.  Modify the default to:

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


This setting worked best for me, but for more in depth info, check out:

http://www.sephiroth.it/tutorials/flashPHP/amfphp_iconv/page003.php