Welcome, Guest
  • Author Topic: Solution to foreign characters from mysql  (Read 1390 times)

    Vladimir M

    • Server what's that
    • *
    • Posts: 6
      • View Profile
    Solution to foreign characters from mysql
    « on: 04/07/04, 16:36 »
    1. Write the needed characters in your database in { format (there are some great php converters out there.).

    2. Go to http://www.unicode.org  find the /u0123 values of your character
    http://code.cside.com/3rdpage/us/unicode/converter.html


    3. Write a function in your flash that ads a /u0123 format code into your string instead the html characters { in your database.

    enjoy



    p.s. there are some explanations how to solve not seeing the characters with erasing the utf8 statements in AMFPHP and CONFIGURING YOUR database language to the needed one. this is not easy and MANY times not possible (because it is not your server) plus you are forcing yourself to one language and loosing the encoding in amf :P
    flash. should i'll love it or hate it .
    i'll love it when they put a directx engine in it
    (and a coffee maker)

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:Solution to foreign characters from mysql
    « Reply #1 on: 04/08/04, 01:49 »
    Hi Vladimir, welcome to the Boards !

    Thanks for the tip.
    Anyway, perhaps is more easy just to use the utf8_encode() function to convert needed data in your DB.

    Jorge

    Vladimir M

    • Server what's that
    • *
    • Posts: 6
      • View Profile
    Re:Solution to foreign characters from mysql
    « Reply #2 on: 04/08/04, 02:36 »
    it dosen't work.  i'we tried all solutions like editing serialization or writing with utf8 into the database but mostly the problem comes with not being able to change the databae language

    thanks for the welcome
    flash. should i'll love it or hate it .
    i'll love it when they put a directx engine in it
    (and a coffee maker)

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re:Solution to foreign characters from mysql
    « Reply #3 on: 04/08/04, 04:33 »
    Hi Vladimir,
    Flash allways converts data to utf8 for transportation. So your data is safe.

    But if you store it in a database, I would decode it before you save, and encode it before you send it back to flash.

    This is no problem, because you have to handle it anyway with a php procedure, which can do the en-(de)coding.
    happy flashing
    8)
    Ronald