Welcome, Guest
  • Author Topic: Euro Character through AMFPHP  (Read 3624 times)

    Ixthus

    • Server what's that
    • *
    • Posts: 41
      • View Profile
    Euro Character through AMFPHP
    « on: 10/07/08, 08:02 »
    I've tried everything, but i still can't get the euro character stored in the database to return to flash through the amfphp gateway. I'm almost certain that it has something to do with encoding, put i am stumped as to what the solution is. Best solution would be a change in gateway.php. I can't alter the data being inserted in the DB, as it is coming from a different source.
    If the solution involves adding a php decode/encode to the results or each query, then how would i do this?

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Euro Character through AMFPHP
    « Reply #1 on: 10/07/08, 09:01 »
    question is, how are the contents stored in the database (characterset of the database).

    For transport of special characters, UTF8 is the best solution. Flash uses it by default
    happy flashing
    8)
    Ronald

    Ixthus

    • Server what's that
    • *
    • Posts: 41
      • View Profile
    Re: Euro Character through AMFPHP
    « Reply #2 on: 10/07/08, 09:09 »
    utf8_unicode_ci is being used...

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Euro Character through AMFPHP
    « Reply #3 on: 10/07/08, 09:16 »
    make sure that all other processes send utf8 encoded characters/especialy that the needed characters are encoded right.
    And make sure your textfield uses a font, embeded font, containing these.
    happy flashing
    8)
    Ronald

    Ixthus

    • Server what's that
    • *
    • Posts: 41
      • View Profile
    Re: Euro Character through AMFPHP
    « Reply #4 on: 10/07/08, 09:46 »
    embedding isn't the problem. i'm using the amfphp service browser, and i traced the values to the output window when i tried in flash. Neither will display the € symbol.
    The characters are being stored in the DB as UTF8. Flash isn't an issue, cause even if i use textfields, and set their contents to text containing a € symbol, it gets displayed. So somehow the € is getting lost in php.
    There is a line in gateway.php:
    $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
    has this any bearing?
    Also, if i try to save my service file in utf8, it doesn't execute, but gives the following error:

    (Object)#0
      message = "faultCode:INVALID_AMF_MESSAGE faultString:'Invalid AMF message' faultDetail:'
    Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/stayireland/stayireland.ie/app/microsites/flashservices/services/Accommodation.php:1) in /hsphere/local/home/stayireland/stayireland.ie/app/microsites/flashservices/core/shared/exception/php4Exception.php on line 38
    '"
      name = "Error"
      rootCause = (null)