Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 4 of 4

Thread: Special Characters: Flash + PHP + MySQL

  1. #1

    Special Characters: Flash + PHP + MySQL

    Hi:

    I made a small user registration and login system with Flash front-end, but when I try to write values with special characters to the db, I get something else. For example, an is recorded as á.

    I've found lots of information about issues like this, but couldn't solve it yet.

    - In the swf file, I got System.useCodePage=true;. I create a loadVars objectand send it to the db thru a php script using sendAndLoad with POST.

    - If I execute a query in the dB's command line, the value is written correctly.

    - In PHP, I'm converting the string to utf8: $variable = utf8_encode($variable);

    - MySQL version is 4.1.21 standard, The character set and collation is utf8_unicode_ci and utf_8.

    Well, I don't know if this is enough to show what's the problem, I'm really going crazy with this. Any help will be appreciated.

    Thanks a lot, regards.

  2. #2
    what does echo $variable look like?

  3. #3
    If I return to flash the value of $variable like this:

    $variable2 = $variable;
    return("variable2=$variable2");


    I get into flash the right value, the special characters are displayed ok. In this case I avoided using utf8_encode($variable);

    Anyway, when it's written into the database, the problem is the same.

    I changed every utf_8 in the db to latin1, turned off system.useCodePage in Flash, but the characters are not correctly saved yet.



    Thanks a lot!

  4. #4
    I finally made it work changing the db's character set to latin1 and using charset=utf8 in the html document where I embed the swf file.
    Last edited by durreimon; January 18th, 2007 at 10:29 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012