views:

147

answers:

1

Hi I am creating some application in flex and one of my purposes is to read content of file and display it in flex. There is huge problem, when I have file written in polish (which contains some special characters) because amfphp transfers this contents few seconds, which is to long (reading and sending content of file without any polish character if fast).My php code reads any files fast, so problem is on amfphp side. Is there any solution or I have to go with HTTPService and load contents of file directly from flex?? Thanks for any tips.

+1  A: 

Amfphp uses the charset ISO-8859-1 by default, and those special characters are not supported by ISO-8859-1. Flash does support special characters because it uses UTF-8 by default. You need to change the setting in gateway.php. Finding a line like

$gateway->setCharsetHandler( "utf8_decode", "ISO-8859-1", "ISO-8859-1" );

and replace with

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

You can read the notes at the beginning of gateway for reference.

Terrence Lee